As Technet Gallery is retiring so moving the code to Git Hub. (click below github download link for this script)
https://github.com/VikasSukhija/Downloads/blob/master/ExportAdattributesOU.ps1
Hi All,
This script is part two of Export active directory script
http://gallery.technet.microsoft.com/scriptcenter/Export-Active-Directory-5cf4938d
This works same as above except it will extract the data from particular OU.
No need of formating or importing CSV to excel file as this will do all the work for you.
Note:- I have commented sizelimit 0 so as to see the output of first 1000 users, you can remove it so that all users can be exported.
Also, I have used extnsionattribute1 to extract some custom values, you can change that accordingly.
more info on http://techwizard.cloud
running from c:\scripts
Define OU :- $OU = ‘OU=Users,DC=Lab,DC=labtest,DC=com’ #define OU
Pls rate the contribution if it worked for you.
download Quest Management Shell (its a free shell) –> http://www.quest.com/powershell/activeroles-server.aspx
Thanks for reading …
Tech Wizard