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

set external smtp adress as primary

Hi experts,

I'm using a custom made script which imports contacts in AD.
After the import I can see the contacts in Exchange but the e-mailadresses are set as external smtp adresses. Is there a way with powershell or gui to set external smtp adresses to primary smtp adresses? I can do this manually by copying the external smpt adress, choose add and then smtp and choose paste. I receive a notification “the object must be upgrade to the current Exchange version. After the upgrade the object cannot be managed by an earlier version….” Unfortunately I have to this for 3000+ contacts.

I already used this command to upgrade all the contacts to Exchange 2010.

Get-MailContact -resultsize Unlimited | Set-MailContact -CustomAttribute1 Update

But now I still have to find a quick way to set the external smtp as primary.

Please help!

Kind regards,

Lennaert van der Meer
0
KNBsysteembeheer01
Asked:
KNBsysteembeheer01
  • 3
  • 2
2 Solutions
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
Primary SMTP always shows as SMTP .... whereas secondary shows as smtp :)

Hope this might help
http://www.networksteve.com/exchange/topic.php/POWERSHELL:_Problem_setting_primary_SMTP_address_as_the_External/?TopicId=14786&Posts=5


http://social.technet.microsoft.com/Forums/en/exchangesvradmin/thread/ed92aed8-e5af-4a58-b6b6-38f76433c48d
$addrs = import-csv addrs.csv

foreach ($addr in $addrs){
$contact = get-recipient $addr
set-mailcontact $contact -externalemailaddress $contact.primarystmpaddress
}

http://www.powershellcommunity.org/Forums/tabid/54/aft/3359/Default.aspx

- Rancy
0
 
KNBsysteembeheer01Author Commented:
Hi Rancy,

Thanks for your quick reply but I looks like your solution is just the other way around.
I need to set my external smtp adress as primary. Instead of my primary as external.

See screenshot.
screenshot-exch2010.PNG
0
 
KNBsysteembeheer01Author Commented:
Woohoo, found the solution.

This was my procedure.

After importing the contacts I used powershell:

Get-MailContact -resultsize Unlimited | Set-MailContact -CustomAttribute1 Update

Than I selected all of my contacts and marked the box: Update E-Mail Addresses Based on Recipient Policy.

After that all of my contacts where corrected.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
0
 
Rajitha ChimmaniCommented:
You can try below.

$Contacts = Get-MailContact -resultsize Unlimited
foreach($contact in $Contacts){
[string]$ExternalSMTPAddress = $Contact.ExternalEmailAddress.SMTPaddress
Set-MailContact $contact.Name -PrimarySMTPAddress $ExternalSMTPAddress
}
0
 
KNBsysteembeheer01Author Commented:
I found the solution but Rancy pointed me to the right sites to find it.
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

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