Comments on: Powershell to create contacts in Exchange 2007 from the given CSV/2009/06/08/powershell-to-create-contacts-in-exchange-2007-from-the-given-csv/Microsoft Exchange & OWA Resources, Information - Optimize, Support, Manage | How-To | Guides | Reference | AdminMon, 11 Jun 2012 19:34:02 +0000hourly1http://wordpress.com/By: jamie/2009/06/08/powershell-to-create-contacts-in-exchange-2007-from-the-given-csv/#comment-766Mon, 11 Jun 2012 19:34:02 +0000/?p=509#comment-766csv must be like this:
Displayname,EmailAddress,Alias
Krishna kumar,krishna.k@domain.com,Krishna.k

]]>
By: Pete/2009/06/08/powershell-to-create-contacts-in-exchange-2007-from-the-given-csv/#comment-427Sun, 17 Jul 2011 02:40:16 +0000/?p=509#comment-427hi here the deal
i want to create a contact in a specifict place i have live 100 contcts to create and i got an excel sheet with first name, surname emial address and the country
how can i acheive this in exchange 2007 ?

]]>
By: Krishna - MVP/2009/06/08/powershell-to-create-contacts-in-exchange-2007-from-the-given-csv/#comment-356Fri, 10 Dec 2010 19:55:50 +0000/?p=509#comment-356Can you please send the exact error what you are seeing ?

]]>
By: Rusty/2009/06/08/powershell-to-create-contacts-in-exchange-2007-from-the-given-csv/#comment-355Fri, 10 Dec 2010 01:49:46 +0000/?p=509#comment-355when i run the script i get Unexpected token ‘in’ in expression or statement. any thoughts

]]>
By: Krishna/2009/06/08/powershell-to-create-contacts-in-exchange-2007-from-the-given-csv/#comment-33Mon, 06 Jul 2009 10:20:43 +0000/?p=509#comment-33Hello Rickb,

Thanks for the post

you need to have CSV in the below mentioned format in the contacts.csv

Display name,EmailAddress,Alias

Krishna kumar,krishna.k@domain.com,Krishna.k

Below code will read csv file one by one and create the contact in the OU users.

$csv = Import-Csv “C:\Contacts.csv”
foreach($line in $csv)
{
New-MailContact -Name $line.DisplayName -ExternalEmailAddress $line.EmailAddress -OrganizationalUnit “users” -Alias $line.Alias
}

]]>
By: Rickb/2009/06/08/powershell-to-create-contacts-in-exchange-2007-from-the-given-csv/#comment-32Mon, 06 Jul 2009 05:52:00 +0000/?p=509#comment-32Hi,

Can you post an example of the CVS format please.

Many thanks,

Rickb.

rick.bone@datacom.com.au

]]>