Question : contact script

Just acquisitioned a company. I want to dump all their users out and import them into my AD as mail enabled contacts. Anyone have a script for this?

Answer : contact script

What version of exchange? 2003 or 2007. The following will work for exchange 2003.

To export the Gal to CSV
Use this command from both domains

csvde.exe -r "(&(objectCategory=person)(objectClass=user)(mail=*))" -l "objectClass, displayName, DN, msExchPoliciesExcluded, mail, mailnickname," -f "c:\export.csv"

Open the CSV file with excel
Remove any users who you do not want to be in the Gal.
Change the DN field to the OU of where the contacts should be imported to for all users
Change the objectclass to contact for all users
Copy the entire mail column to another Colum
Change the name of the one of the mail columns to targetaddress
Change the target address column so that the address includes a smtp: “SMTP:[email protected]".
Save the file

Run the following command to import
csvde -i -f c:\”name of edited file.csv"


Random Solutions  
 
programming4us programming4us