开发者

Powershell GUIs - Is there an Active Directory dialog box for selecting an OU? Like the FileOpenDialog?

Is there a class (possibly exposed through .NET) that allows you to kick off an active directory gui tree list? I开发者_JAVA技巧 have an app where I'm iterating the top level OU structure of a domain and presenting the distinguished name in a dropdown in my PowerShell gui but a more elegant solution (IMO) would be to click a button and allow the user to select the level of the OU to run the program against. Does anyone know what library/class/etc. I could use to accomplish this task in PowerShell? thanks in advance!


So it isn't perfect but I modified a treeview to dynamically enumerate the local domain structure displaying distinguishedNames. Now, this isn't perfect, but it works for what I need it for:

http://thepip3r.blogspot.com/2011/06/powershell-guis-active-directory.html


It exists as COM object usable in C++ as explain in Microsoft Documentation.

Multiple developers port it to .NET. I use the one from a french code sharing named Codes-Sources and adapt it to my needs.


Edited

You can get there to use Microsoft Directory Object Picker in PowerShell.


kudos to Micah for this awesome solution from https://itmicah.wordpress.com/2016/03/29/active-directory-ou-picker-revisited/

(I have been previously criticized on stackoverflow for posting a link only but for this no alternative as this code exceeds the 30,000 characters allowed)

https://raw.githubusercontent.com/ITMicaH/Powershell-functions/master/Active-Directory/OUs/ChooseADOrganizationalUnit.ps1

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜