Creating Contacts for all Exchange 2010 Mailboxes

Hi Friends,

I am having one requirement, I want to create Mail Enabled Contacts for All Mailboxes (will take mailbox user list from CSV file) in Exchange 2010, i want to keep Full Name and Alias Name of the Contact same as per User Mailbox but change in the Contacts email address like Contacts email should change from @contoso.com to @contoso.co.in keeping Contacts Alias intact.

Kindly suggest some scripts or commands...

June 3rd, 2015 2:06am

Hi Ranjith,
Please export the current users from Exchange EMC.
And change the address to conto.co.in and create a csv file similar to the below picture

Use the below command to create contacts in bulk

Import-Csv C:\mailcontacts.csv | foreach {New-MailContact -Name $_.NAME -Alias $_.Alias -ExternalEmailAddress $_.emailid}		
Free Windows Admin Tool Kit Click here and download it now
June 3rd, 2015 5:19am

Hi,

Can we extract Alias, Full Names and SMTP Address for the mailboxes those does not have Forwarding Set?

June 3rd, 2015 7:42am

This command will export the mailbox details which doesn't have forwarding enabled.

Get-mailbox | select DisplayName,Alias,PrimarySMTPAddress,ForwardingAddress | where {$_.ForwardingAddress -eq $Null} | export-csv C:\mailboxes.csv
Free Windows Admin Tool Kit Click here and download it now
June 3rd, 2015 8:03am

Thanks a ton, let me execute both the commands and update you back...
June 3rd, 2015 8:06am

Hi,

Below command has worked and exported mailboxes those does not have forwarding set.

Would it be possible, that we can also set forwarding + Enable Deliver Message to both forwarding Address and Mailbox options by referring csv file, if yes, please share the command and csv file format. Thanks in advance

Free Windows Admin Tool Kit Click here and download it now
June 3rd, 2015 9:02am

Also, the Output of second command CSV file first Column has DisplayName whereas in your first command you mentioned to use NAME in First Column of csv file.

Please advise...

June 3rd, 2015 9:16am

You can use this command if it makes difference
Import-Csv C:\mailcontacts.csv | foreach {New-MailContact -DisplayName $_.NAME -Alias $_.Alias -ExternalEmailAddress $_.emailid}
Free Windows Admin Tool Kit Click here and download it now
June 3rd, 2015 9:20am

Hi,

Thanks, i will update you with the result by day after tomorrow.

June 3rd, 2015 9:27am

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

Other recent topics Other recent topics