Recently I was tasked with performing a mass update on a large HMC / multi tenant style Exchange 2007 implementation. The update itself was a reasonably simple one – prevent Outlook clients who were not running in cached mode from connecting to their mailboxes (as an aside the reasoning for this was the need to prevent clients with desktop search applications from having a negative performance impact on mailbox servers), the PowerShell cmdlet to do this is ‘Set-CasMailbox’.
In our test environment I executed the following in an Exchange PowerShell session:
Get-CasMailbox -OrganizationalUnit ‘PlatformUsers’ -resultsize unlimited | Set-CasMailbox -MAPIBlockOutlookNonCachedMode:$true
This had the desired effect however took quite some time to run, so looking for a way of speeding this up I stumbled upon the UseRusServer option. Including this the above command now looks like this:
Get-CasMailbox -OrganizationalUnit ‘PlatformUsers’ -resultsize unlimited | Set-CasMailbox -MAPIBlockOutlookNonCachedMode:$true -UseRusServer <servername>
By using this command Exchange doesn’t have to look for a server running the Recipient Update Service, this makes the process a lot faster (by some rough timings in this environment somewhere between 7-10 times faster) it also meant I had control over which server was used to perform the update against, I chose a server responsible for OAB generation, Exchange could have chosen a mailbox server holding user mailboxes, there likely wouldn’t have been a performance impact but why take the risk.
In the live environment this change affected around 400,000 accounts, so the performance improvement was worth having!