Link to home
Start Free TrialLog in
Avatar of KNBsysteembeheer01
KNBsysteembeheer01

asked on

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
SOLUTION
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KNBsysteembeheer01
KNBsysteembeheer01

ASKER

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
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can try below.

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