PS Script to Upgrade Mail Contacts to 2010
We recently migrated from Exchange 2007 to Exchange 2010 SP1 and want to upgrade all existing mail contacts to Exchange 2010 contacts. From what I can tell, all that this really entails is to update the attribute 'msExchVersion to be the value of '44220983382016.' I tried the following to try and force the contact to be upgraded to Exchange 2010 and neither set the msExchVersion appropriately: $DataTable = Get-MailContact -Resultsize:Unlimited -Filter {ExchangeVersion -ne 44220983382016} $DataTable | ForEach-Object {$_| update-Recipient} and $DataTable = Get-MailContact -Resultsize:Unlimited -Filter {ExchangeVersion -ne 44220983382016} $DataTable | ForEach-Object {$_| set-MailContact -EmailAddressPolicyEnabled:$False -ForceUpgrade} The only workarounds I have found so far is to actually modify an attribute on the mail contact to force the upgrade like the example below and then go back and clear the value on custom attribute which is a real PIA or to simply write the value '44220983382016' directly to the msExchangeVersion attribute. $DataTable = Get-MailContact -Resultsize:Unlimited -Filter {ExchangeVersion -ne 44220983382016} $DataTable | ForEach-Object {$_| set-MailContact -CustomAttribute1 "Updated" -EmailAddressPolicyEnabled:$False -ForceUpgrade} I'm thinking there has to be an easy way to do this with using the Exchange 2010 shell as I can't be the only one to ever come across this. If it can't be done via PowerShell without modifying the mail contact, is it supported to directly modify the msExchangeVersion attribute?
January 18th, 2012 8:34am

I'm sure you've already tried this, but just in case, have you tried simply running? Get-MailContact -Resultsize:Unlimited -Filter {ExchangeVersion -ne 44220983382016} | Set-MailContact -ForceUpgrade Does that simply produce a warning stating that nothing has been updated or does it help? I can't test this myself as we're not in a migratory position, but if that doesn't help then there are alternatives to explore. Cheers, Lain
Free Windows Admin Tool Kit Click here and download it now
January 18th, 2012 8:44am

I have tried that and you are correct - you get the warning stating no settings have been modified...
January 18th, 2012 9:38am

I'm thinking there has to be an easy way to do this with using the Exchange 2010 shell as I can't be the only one to ever come across this. If it can't be done via PowerShell without modifying the mail contact, is it supported to directly modify the msExchangeVersion attribute? Hi, I haven't got -Forceupgrade to work on mailcontacts either so I have also used the "method" of changing an attribute. Example: Get-MailContact -resultsize Unlimited | Set-MailContact -CustomAttribute1 Update Get-MailContact -resultsize Unlimited | Set-MailContact -CustomAttribute1 $null Martina Miskovic
Free Windows Admin Tool Kit Click here and download it now
January 18th, 2012 4:55pm

Thanks Martina. I'll utilize that as a last resort if necessary but you would think MS would bake this functionality into the product natively without having to change the object.
January 19th, 2012 7:32am

Hi I think that is because the msExchHomeServerName for some users pointed to a no more existing servername. And update-recipient will update the attributes after the msExchHomeServerName attributes were updated. If you would like to ask MS to put into product. You can ask on development forum http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads Cheers Zi Feng
Free Windows Admin Tool Kit Click here and download it now
January 19th, 2012 9:52pm

The msExchHomeServerName attribute is exclusive to mailbox-enabled objects and is not present on mail-enabled contacts so I'm not quite sure how that would/would play into the equation here. I posed this question in this forum to see if the functionality did exist and I was just missing something. I'm beginning to think that upgrading the object to be an Exchange 2010 mail contact will require modifying the object. Anyone have any other thoughts?
January 23rd, 2012 10:03am

Hi, I haven't got -Forceupgrade to work on mailcontacts either so I have also used the "method" of changing an attribute. Example: Get-MailContact -resultsize Unlimited | Set-MailContact -CustomAttribute1 Update Get-MailContact -resultsize Unlimited | Set-MailContact -CustomAttribute1 $null Martina Miskovic Thank you very much, Martina! This was driving me nuts not being able to update the hundreds of contacts to Exchange version 2010. Your method did the trick nicely. Much appreciated.
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2012 10:26pm

I got it to work by changing the Use Mapi rich text format, replace the ExchangeVersion as needed. Get-MailContact -ResultSize Unlimited | where {$_.ExchangeVersion -eq "0.0 (6.5.6500.0)"} | Set-MailContact -UseMapiRichTextFormat "Always" -ForceUpgrade -Confirm:$False
April 10th, 2012 8:22am

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

Other recent topics Other recent topics