Sector001 Posted October 11, 2019 Posted October 11, 2019 Hi all. I'm wanting to pull a list of AD users to a CSV. Please can someone help? Thank you.
3s-gtech Posted October 11, 2019 Posted October 11, 2019 It's built into Active Directory. Right click on an OU and select Export list. Then choose the location and format. 2
Ditto Posted October 11, 2019 Posted October 11, 2019 (edited) Powershell. Personally a bit too much of a n00b myself to give you an example but someone I'm sure someone will be along shortly. *** EDIT *** Beaten to it, and in fact even simpler! PS might be useful in future depending on exactly what details you with to pull. Edited October 11, 2019 by Ditto
Norphy Posted October 11, 2019 Posted October 11, 2019 PowerShell is your friend get-aduser -Server your.dc.name.here -SearchBase "ou=DN,dc=of,dc=an,dc=OU,dc=here" -filter * | select samaccountname, userprincipalname, givenname, surname | convertto-csv -NoTypeInformation | out-file users.csv You will RSAT installed on whatever you run that on with the AD PowerShell module. Or run it on a domain controller.
unixman_again Posted October 11, 2019 Posted October 11, 2019 It's built into Active Directory. Right click on an OU and select Export list. Then choose the location and format. How long has that been there? It's about flippin' time. Still no sensible wild cards on find though....
3s-gtech Posted October 11, 2019 Posted October 11, 2019 Not sure - it was in 2008 and maybe earlier? Once it's in CSV at least you can manipulate it in your spreadsheet.
jthompson Posted October 11, 2019 Posted October 11, 2019 WiseSoft Bulk AD Users will let you go the other way, too, as well as let you export multiple OUs or groups to CSV.
CHiLL Posted October 11, 2019 Posted October 11, 2019 It's built into Active Directory. Right click on an OU and select Export list. Then choose the location and format. Click that on the ou you want to export [ATTACH=CONFIG]55303[/ATTACH] Don't those features only export the users in the OU you've got selected? If you have organised sub-OUs for student year groups, teaching staff, support staff, admin staff, etc - they won't be exported. I'd use PowerShell command @Norphy posted.
jthompson Posted October 11, 2019 Posted October 11, 2019 Don't those features only export the users in the OU you've got selected? If you have organised sub-OUs for student year groups, teaching staff, support staff, admin staff, etc - they won't be exported. You can also create a new query in ADUC to list objects from across OUs, etc. and then use the CSV export option against a saved query.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now