Link to home
Start Free TrialLog in
Avatar of susnewyork
susnewyorkFlag for United States of America

asked on

Active Directory User dump

Hi, I am using the following script to dump Server2003 AD to csv file.

CSVDE -f onlyusers.csv -r objectCategory=person

The script works fine but I want to tell if the user is disabled or not. Either the script does not pull this filed, OR I am not recognizing the column title for disabled account.

Can someone please tell me how to include this field in the dump, OR identify the field for me.

I am looking for a dump showing me all basic user information which is found on the AD GUI. (Is there a better script out there??)

Thanks.
CSVDE -f onlyusers.csv -r objectCategory=person

Open in new window

Avatar of Mike Kline
Mike Kline
Flag of United States of America image

What I like for this is a tool called adfind by MVP Joe Richards
http://www.joeware.net/freetools/tools/adfind/index.htm
For a dump of all enabled users use
adfind -default -binenc -bit -f  "&(objectcategory=person)(objectclass=user)(!useraccountcontrol:AND:=2)" samaccountname givenname sn -csv > c:\enabledusers.csv
What I did there was dump only samaccountname first and last name
You can choose any fields you want.
Hope that helps.
Thanks
Mike
 
 
 
Avatar of susnewyork

ASKER

Thank you, however I am looking for a complete dump of ALL users, but with a way to sort active and disabled.

ASKER CERTIFIED SOLUTION
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial