Monday, October 16

Using LDIFDE

ldifde is an Important tools for system administrations. Recently, one of our customer called up for tools to update 600 objects in Active Directory - My God - am I going to do one by one?

Let us intro and explain a bit on LDIFDE.
--------------------------------------------------------------------------------
LDIFDE stands for Lightweight Directory Access Protocol Interchange Format (LDIF) Directory Exchange, a utility for bulk import/export of data between line-delimited (LDIF) text files and Active Directory. Unlike CSVDE, ldifde can add, delete, or modify multiple user accounts, groups, computers, printers, or other AD objects in a single batch operation - solve the problem.

Examples
You can create one file called C:\newusers.txt, copy the text shown below and save it, which creates three new user accounts:

# Create user account for Poo
dn: CN=Poo,OU=Support,DC=London,DC=com
objectClass: users
AMAccountName: Poo
userPrincipalName: poo@london.com
displayName: Poo Malaysia
AccountControl: 514

# Create user account for Jen
dn: CN=Jen,OU=PM,DC=London,DC=com
objectClass: users
AMAccountName: Jen
userPrincipalName: jen@london.com
displayName: Jen Project Manager
AccountControl: 514

# Create user account for Gavin Lai
dn: CN=Gavin Lai,OU=Management,DC=london,DC=com
objectClass: users
AMAccountName: Glai
PrincipalName: gavinlai@london.com
displayName: Gavin Lai
AccountControl: 512

Use ldifde to import the previous file into AD to create the users:

ldifde -i -f C:\newusers.txt

No comments: