Export a Specific OU to CSV

Twhite0909
Twhite0909 used Ask the Experts™
on
I have loaded the QUEST add on to AD Powershell.  The cmd I found works but only for the top level OU called Locations.  I need to drill down to get users out of an OU that is two levels below the OU=Locations.......OU=Locations\HSG\UK

Here is the cmd what am I doing wrong  - Thanks

get-qaduser -searchroot "OU=Locations\HSG\UK,DC=AD,DC=LOCAL"
 | Select Name, Parentcontainer | Export-csv C:\temp\users1.csv -notype
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
The correct search string is "OU=UK,OU=HSG,OU=Locations,DC=AD,DC=LOCAL".

Author

Commented:
.......

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial