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

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.
Free Windows Admin Tool Kit Click here and download it now
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
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?
Free Windows Admin Tool Kit Click here and download it now
January 23rd, 2012 10:03am

Martina_Miskovic: Thanks - That worked great for me! I verified before and after that it upgraded by doing this: Get-MailContact -ResultSize unlimited | ft DisplayName,ExchangeVersion Get-MailContact -resultsize Unlimited | Set-MailContact -CustomAttribute1 Update Get-MailContact -resultsize Unlimited | Set-MailContact -CustomAttribute1 $null Get-MailContact -ResultSize unlimited | ft DisplayName,ExchangeVersion Russell
October 19th, 2012 1:13pm

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

Other recent topics Other recent topics