Export user attributes

  • Thread starter Thread starter jallen
  • Start date Start date
J

jallen

How can I export the username and logon script attributes
of each of my users to a file?
 
Hi Jallen,
LDIFDE will do the job for you. Try the following:

ldifde -f users.txt -d "dc=DOMAIN,dc=COM" -p subtree -r
(&(objectCategory=person)(objectClass=user)) -l "cn,givenName,scriptPath"
 
Thanks for the help! Am I correct that the script will
export only a copy of the object? I don't want to actually
export the object, but rather just produce a list that I
can manipulate elsewhere. Thanks.
 
If you want to manipulate the results, you might want to use csvde.exe. The
syntax are almost the same, except that you can export it to a csv file
which you can then manipulate in Excel.
Both utilities allows you to perform import and export as well. However,
always backup your database and test with a small group of test OU before
performing a mass import.

The command for csvde.exe is as follow:

csvde -f USERS.CSV -d "dc=DOMAIN,dc=COM" -p subtree -r (objectClass=user) -
l "cn,givenName,scriptPath"

Note:
- I wasn't able to specify more than one clause for the filter (-r option).
Don't understand why?
- You might want to start with a small OU to verify that it's what you want.
To do that, replace the -d "dc=domain,dc=com" with -d
"ou=testOU,dc=domain,dc=com".

Refer to the following articles for more information:
http://support.microsoft.com/?id=237677
http://support.microsoft.com/?id=327620
 
Back
Top