Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

importing contacts 1

Status
Not open for further replies.

shazzam1

MIS
May 25, 2006
137
US
Hello all,

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?

thanks.
 
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
 
-OrganizationalUnit "MyDomain.local/Mail Contact"

Yes, I just looked at a script I actually used to import contacts and it is indeed as indicated above: MyDomain.local or whatever your domain is called - .org, .net, etc.

Shazzam1:

Were you able to try the above?

Did it work?
 
no it did not I still get this error message.

Organizational unit "domain name\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" }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top