AD Picker

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 8 years old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
robert.ganshorn
Posts: 54
Last visit: Sat Nov 25, 2023 8:17 pm

AD Picker

Post by robert.ganshorn »

Has anyone ever been able to bring up the ADUC (AD Users & Computers) picker in powershell? I found a few code examples, but they either don't work correctly - or at all. I have a custom programmed one using a treeview and it's ok, but ADUC would still be better if possible.

Rob
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: AD Picker

Post by jvierra »

There is no ADUC control for Windows Forms. Are you referring to the MMC snap-in. Only MMC can host a snap-in. ADUC is an MMC with an add-in. You cannot host this in a form.

Here is an example of using a Treeview to navigate the AD container hierarchy.
Attachments
Demo-ADSITreeView.psf
(15.56 KiB) Downloaded 203 times
User avatar
dan.potter
Posts: 709
Last visit: Wed Nov 14, 2018 11:39 am

Re: AD Picker

Post by dan.potter »

You can build one yourself. I used the general code from here and modified it to my environment.

https://itmicah.wordpress.com/2013/10/2 ... owershell/
This topic is 8 years old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked