• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 510
  • Last Modified:

Add mail contacts in Exchange 2010

Hi

We would like to add multiple mail contacts in Exchange 2010 possibly using csv or excel?
Is there a way to do?

Can someone please provide some instruction?

Thanks,
Adam
0
goraek
Asked:
goraek
2 Solutions
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
$csv = Import-Csv “C:\Contacts.csv”
foreach($line in $csv)
{
New-MailContact -Name $line.DisplayName -ExternalEmailAddress $line.EmailAddress -OrganizationalUnit “Contacts” -Alias $line.Alias
}

- Rancy
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
csv must be like this:
Displayname,EmailAddress,Alias
Rancy Expert,Rancy.expert@domain.com,Rancy.E

- Rancy
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
How to Create a Contact in Active Directory with VBScript
http://computerperformance.co.uk/vbscript/vbscript_contact_create.htm

How to Create a Contact in an Exchange Organization with VBScript
http://www.computerperformance.co.uk/vbscript/vbscript_contact_exchange.htm

- Rancy
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
SediqdCommented:
check this article 'Mail-Enable Multiple Existing Contacts':

http://technet.microsoft.com/en-us/library/bb684891.aspx
0
 
Praveen BalanSolution ArchitectCommented:
you may use the below script,

The below script will create in mentioned OU (create an OU called Contacts under your domain name and update it on the script).

The below script will also help you to update almost all details of the contact, rather just creating the contact(details like phone number, office, etc ...).

Copy the below into a notepad and save as _NewMailContact.ps1 and navigate to the path from the EM Shell and run the script. You may also run this by copying and pasting directly to the EM Shell(ensure that the input file is created and saved correctly).
----------------------
Import-Csv C:\Input\MailContact.csv |foreach{

New-MailContact -Name $_.cn -ExternalEmailAddress $_.mail -Alias $_.sAMAccountName -FirstName $_.givenName -LastName $_.sn -displayname $_.displayName -OrganizationalUnit "domain.local/Contacts"

Set-Contact -id $_.sAMAccountName -Phone $_.telephoneNumber -Office $_.physicalDeliveryOfficeName -Department $_.department -Company $_.company -Title $_.title
}
----------------------
Input file should be like below(see the attached file) - this I have used many time to ease the execution ... try on a test setup and go with it...

replace the portion marked in bold with correct details.
MailContact.csv
0
 
goraekAuthor Commented:
Hi Praveen,

I tried your command no good.

It says that the Name is an empty string.

Can you please provide a step-by-step guide?

Thanks,
Goraek
0
 
goraekAuthor Commented:
Thanks, I worked out another solution but used your information as reference
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now