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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Check this article once
How to change External SMTP Address for Mail Contacts in Exchange 2007
https://www.experts-exchange.com/questions/24277354/How-to-change-External-SMTP-Address-for-Mail-Contacts-in-Exchange-2007.html
PowerShell Script to Create Multiple Exchange Mailbox and Set Primary SMTP Addresses
http://myitforum.com/cs2/blogs/yli628/archive/2009/02/19/powershell-script-to-create-multiple-exchange-mailbox-and-set-primary-smtp-addresses.aspx
http://www.powershellcommunity.org/Forums/tabid/54/aft/5104/Default.aspx
- Rancy
How to change External SMTP Address for Mail Contacts in Exchange 2007
https://www.experts-exchange.com/questions/24277354/How-to-change-External-SMTP-Address-for-Mail-Contacts-in-Exchange-2007.html
PowerShell Script to Create Multiple Exchange Mailbox and Set Primary SMTP Addresses
http://myitforum.com/cs2/blogs/yli628/archive/2009/02/19/powershell-script-to-create-multiple-exchange-mailbox-and-set-primary-smtp-addresses.aspx
http://www.powershellcommunity.org/Forums/tabid/54/aft/5104/Default.aspx
- Rancy
You can try below.
$Contacts = Get-MailContact -resultsize Unlimited
foreach($contact in $Contacts){
[string]$ExternalSMTPAddre ss = $Contact.ExternalEmailAddr ess.SMTPad dress
Set-MailContact $contact.Name -PrimarySMTPAddress $ExternalSMTPAddress
}
$Contacts = Get-MailContact -resultsize Unlimited
foreach($contact in $Contacts){
[string]$ExternalSMTPAddre
Set-MailContact $contact.Name -PrimarySMTPAddress $ExternalSMTPAddress
}
ASKER
I found the solution but Rancy pointed me to the right sites to find it.
ASKER
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