Import contacts into exchange 2007
Need help!!! We have two exchange servers for two different companies. I am asked to import the contact from one server to the other (one server let's say exch1 has more contacts than exch2) I have already exported he contacts from exch1 and have created a csv file, what is the command to import the contacts into the exch2 server using powershell? I have used this command: Import-Csv C:\Contacts.csv | ForEach { New-MailContact -Name $_.DisplayName -ExternalEmailAddress $_.EmailAddress -OrganizationalUnit "Mail Contact" } But I get this error message. Organizational unit "Mail Contact" was not found. Please make sure you have typed it correctly. At line:1 char:40 + Import-Csv C:\Contacts.csv | ForEach { N <<<< ew-MailContact -Name $_.Display Name -ExternalEmailAddress $_.EmailAddress -OrganizationalUnit "Mail Contact" } -OrganizationalUnit "Mail Contact" Try: -OrganizationalUnit "MyDomain/Mail Contact" tried that as well same error.... What's the header row look like in the CSV file? DisplayName,EmailAddress
June 10th, 2010 3:24am

Try -OrganizationalUnit "OU=Mail Contact,DC=mydomain,DC=com" Be sure to use the full path for the OU. -- Ed Crowley MVP "There are seldom good technological solutions to behavioral problems." . "tony-b1" wrote in message news:51da5aa0-1a06-4e7d-bf06-0197d19c45f0... Need help!!! We have two exchange servers for two different companies. I am asked to import the contact from one server to the other (one server let's say exch1 has more contacts than exch2) I have already exported he contacts from exch1 and have created a csv file, what is the command to import the contacts into the exch2 server using powershell? I have used this command: Import-Csv C:\Contacts.csv | ForEach { New-MailContact -Name $_.DisplayName -ExternalEmailAddress $_.EmailAddress -OrganizationalUnit "Mail Contact" } But I get this error message. Organizational unit "Mail Contact" was not found. Please make sure you have typed it correctly. At line:1 char:40 + Import-Csv C:\Contacts.csv | ForEach { N <<<< ew-MailContact -Name $_.Display Name -ExternalEmailAddress $_.EmailAddress -OrganizationalUnit "Mail Contact" } -OrganizationalUnit "Mail Contact" Try: -OrganizationalUnit "MyDomain/Mail Contact" tried that as well same error.... What's the header row look like in the CSV file? DisplayName,EmailAddress Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
June 11th, 2010 7:45am

Hi Tony, I can run the cmdlet with -OrganizationalUnit "Mail Contact" as well as -OrganizationalUnit "MyDomain/Mail Contact". (Single Forest and Single domain) And the CSV file is same as yours. I wonder whether there is an OU named "Mail Contact" in your AD... Try to create a new test OU and run the cmdlet. Frank Wang
June 11th, 2010 11:06am

Hi Tony, How about your question? Any updates?Frank Wang
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2010 4:41am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics