[windows2000] Re: Export Active Directory Info

  • From: "Durbin, Jeff" <jdurbin@xxxxxxxxxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Thu, 4 Sep 2003 14:13:03 -0700

You might try LDIFDE as described in MS KB 237677: Using LDIFDE to
Import and Export Directory Objects to Active Directory. Here's an
excerpt:

Export the User Accounts from the Source Domain
At the command prompt, type: 
ldifde -f Exportuser.ldf -s Server1 -d "dc=Export,dc=com" -p subtree -r
"(&(objectCategory=person)(objectClass=User)(givenname=*))" -l
"cn,givenName,objectclass,samAccountName" 

Running this command exports all users in the Export domain into a file
named Exportuser.ldf. If you do not have all the required attributes,
the import operation does not work. The attributes objectclass and
samAccountName are required, but more can be added as needed. 

NOTE: Built-in accounts, such as Administrator, do not have a given
name. By default, the LDAP filter used above does not export those
accounts. LDIFDE does not support exporting passwords. 

  The email address is called 'mail', so if you add it to the list of
fields that are to be exported, you'll get that too. For example, change
this:

"cn,givenName,objectclass,samAccountName"

  to this:

"cn,givenName,objectclass,samAccountName,mail"

Jeff Durbin


-----Original Message-----
From: Greg Reese [mailto:GReese@xxxxxxxxxxxxxxxx] 
Sent: Thursday, September 04, 2003 1:08 PM
To: windows2000@xxxxxxxxxxxxx
Subject: [windows2000] Export Active Directory Info


I want to dump the names and email address of all my users to a csv
file.  It seems like this would be simple enough but I can't find
anywhere to do it.  

Any ideas?

Greg

**********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

**********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: