faza Posted February 8, 2008 Posted February 8, 2008 Hi All, Is there any way to export data from the AD. I would like to export all staff members and their groups assigned to them. Any advice would much great Faza
alan-d Posted February 8, 2008 Posted February 8, 2008 Action Dropdown menu -> Export Then choose the format you want it.
faza Posted February 8, 2008 Author Posted February 8, 2008 I have only got Export List and that only exports the staff list. I unable to add the group as a column.
mattx Posted February 8, 2008 Posted February 8, 2008 You have to pay for this software but its well worth it: http://www.dovestones.com/ Or you can use the CSVDE tool which Imports and exports data from Active Directory.... http://technet2.microsoft.com/windowsserver/en/library/59bec076-01fe-4d09-8b4b-296e7fa9c5571033.mspx?mfr=true
alan-d Posted February 8, 2008 Posted February 8, 2008 I have only got Export List and that only exports the staff list. I unable to add the group as a column. Sorry missed the groups bit
sahmeepee Posted February 8, 2008 Posted February 8, 2008 (edited) I've bodged this script together: dsquery user "OU=Staff,DC=blah,DC=sch,DC=int" -limit 3 > userlist-output.txt for /f "tokens=*" %%i in (userlist-output.txt) do @echo ------ >> groups-output.txt && dsget user %%i -q -L -samid -display >> groups-output.txt && @echo ------ >> groups-output.txt && echo Groups: >> groups-output.txt && dsget user %%i -memberof -expand >> groups-output.txt && @echo ------ >> groups-output.txt findstr -iV "dsget" groups-output.txt > groups-output2.txt move /Y groups-output2.txt groups-output.txt notepad groups-output.txt "OU=Staff,DC=blah,DC=sch,DC=int" would have to be changed to the full path to your staff OU. I'm not sure if you need the adminpak installed on XP to have access to dsget and dsquery. 2003 should have them by default though. It will expand group memberships, so if they are a member of GTP-TRAINEES and that group is a member of TEACHERS it should list both. That means it can be slow to run, so get it working nicely then change the limit from 3 to 1000 and go make a brew. Edited February 8, 2008 by sahmeepee tarted up output a little
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