Click here to monitor SSC
Av rating:
Total votes: 3
Total comments: 0


Ben Lye
Emulating the Exchange 2003 RUS for Out-of-Band Mailbox Provisioning in Exchange 2007
08 May 2009

Exchange's Recipient Update Service was important in Exchange 2000 or 2003 in order to complete the provisioning or updating of mailboxes created from an out-of-band process or from an Active Directory User. In Exchange 2007, full provisioning is automatic, but the functionality can replaced by Powershell scripting if it is required.  

Exchange 2000 and Exchange 2003 included a component known as the Recipient Update Service or RUS.  The RUS runs as a sub-process of the System Attendant, and is responsible for discovering partially provisioned mailboxes and fully provisioning them.  The RUS is required because when user accounts are configured to have a mailbox using Active Directory Users and Computers (ADUC), they only have a few key attributes assigned.  When the RUS discovers these partially configured accounts they are stamped with the remaining required attributes and a mailbox will subsequently be created in the appropriate Exchange database when the mailbox is either logged onto or receives a message.

Many Exchange administrators who have worked with Exchange 2000 or 2003 will have experienced times when the RUS hasn’t worked at all or has worked slowly, and as a result have had problems with mailbox provisioning or updates.

In Exchange 2007 the RUS is no longer present because when a mailbox is provisioned in either of the Exchange management tools it is automatically fully provisioned straight away.  This is great if mailboxes are only ever provisioned using the Exchange 2007 tools, but if you use an out-of-band process to provision mailboxes you will run into trouble as those mailboxes will never be picked up and fully provisioned by Exchange 2007. 

For example, in Exchange 2003 it’s possible to cause a mailbox to be provisioned simply by setting the LegacyExchangeDN, Mailnickname, and homeMDB attributes on a user object.  The RUS will find the user account and will finish provisioning the mailbox.  If you try this with Exchange 2007 you won’t get a usable mailbox

Fortunately, there is a way to emulate the Exchange 2000/2003 RUS on Exchange 2007 using two Exchange 2007 PowerShell cmdlets, Update-EmailAddressPolicy which will apply an email address policy to mailboxes, and Update-AddressList which will update address list memberships. 

The easiest way to run the “update” cmdlets is to pipe input to them from the “get” cmdlets.  These commands will update all email address policies and address lists:

Get-EmailAddressPolicy | Update-EmailAddressPolicy
Get-AddressList | Update-AddressList

After running these commands the mailbox will be provisioned and will appear in the Exchange address lists, but it will appear in the Exchange Management Console as a “Legacy Mailbox”.  A legacy mailbox will still function for sending and receiving email, but it’s not possible to enable or disable Exchange 2007 features such as Messaging Records Management or Unified Messaging.  Legacy mailboxes can be converted to Exchange 2007 mailboxes using the Set-Mailbox cmdlet with the -ApplyMandatoryProperties parameter.

If your Exchange environment has only Exchange 2007 servers this command will update all legacy mailboxes to Exchange 2007 mailboxes:

Get-Mailbox -RecipientTypeDetails LegacyMailbox | Set-Mailbox –ApplyMandatoryProperties

If you have mailboxes hosted on legacy versions of Exchange and on Exchange 2007 you will need to filter the command to only touch those hosted on Exchange 2007.  This command will do that by first getting only the Exchange 2007 servers then finding all the legacy mailboxes on those servers:

Get-ExchangeServer |

Where{$_.AdminDisplayVersion.ToString().SubString(0, 10) -eq"Version 8."} | ForEach{ Get-Mailbox -Server $_.Name -RecipientTypeDetails LegacyMailbox | Set-Mailbox -ApplyMandatoryProperties}

The same problem exists for changes made to users outside of the Exchange Management tools.  Any changes made within the Exchange 2007 tools are instantly reflected in the user’s email addresses and address list membership, but changes which would impact email address polices and address list memberships that are made using out-of-band tools such as ADUC, ADSIEdit, or other tools for directly editing Active Directory will not show up in the Exchange 2007 mailbox properties until the same “update” commands are run.

For example, if there is an email address policy which applies email addresses in the format firstname.lastname, and the last name of a user is changed using an Exchange 2007 tool the user will instantly get a new email address with the new last name.  If the same change is made using an out-of-band tool or process then the name change will not be reflected in the user’s Exchange email addresses.

This problem can also be solved by running the Update-EmailAddressPolicy and Update-AddressList cmdlets.

So, if your environment requires out-of-band mailbox provisioning or user updates then the simplest solution is to put these three commands into a PowerShell script and schedule it to run as often as needed (don’t forget that if you still have mailboxes hosted on legacy Exchange servers you need to change the last command to the filtered version shown above):

Get-EmailAddressPolicy | Update-EmailAddressPolicy
Get-AddressList | Update-AddressList

Get-Mailbox -RecipientTypeDetails LegacyMailbox | Set-Mailbox –ApplyMandatoryProperties

To run the Update-EmailAddressPolicy cmdlet you need to be delegated the Exchange Server Administrator role and have local Administrators rights for the Exchange server. To run Update-AddressList you need to be delegated the Exchange Organization Administrator role.  To run the Set-Mailbox cmdlet you need to be delegated the Exchange Recipient Administrator role.

More Information on the cmdlets can be found on the Microsoft TechNet website:



This article has been viewed 5912 times.
Ben Lye

Author profile: Ben Lye

Ben Lye is a senior systems administrator at a multi-national software company. He has over 10 years experience supporting and administering Windows and Exchange, and has been MCSE and MCP certified since 1999. Ben is passionate about automating and streamlining routine tasks, and enjoys creating and using tools which make day-to-day administration easier.

Search for other articles by Ben Lye

Rate this article:   Avg rating: from a total of 3 votes.


Poor

OK

Good

Great

Must read
 
Have Your Say
Do you have an opinion on this article? Then add your comment below:
You must be logged in to post to this forum

Click here to log in.
 





How to Kill a Company in One Step or Save it in Three
 The majority of companies that suffer a major data loss subsequently go out of business. Wesley David... Read more...

Migrating to Microsoft BPOS - Part II
 In his last article, Johan gave us a crystal clear guide to preparing to migrate from an on-premises... Read more...

Monitoring Mailbox Moves
 Mailboxes moves happen all the time, and given how precious the data in mailboxes can be, you should... Read more...

Emulating the Exchange 2003 RUS for Out-of-Band Mailbox Provisioning in Exchange 2007
 Exchange's Recipient Update Service was important in Exchange 2000 or 2003 in order to complete the... Read more...

The Postmasters
 The Exchange Team introduces themselves, and keeps you up-to-date Read more...

Upgrade Exchange 2003 to Exchange 2010
  In this article, the first of two in which Jaap describes how to move from Exchange Server 2003... Read more...

Upgrade Exchange 2003 to Exchange 2010 - Part II
 In Jaap's second article on upgrading straight from Exchange Server 2003 to 2010, he explains how to... Read more...

Goodbye Exchange ExMerge, Hello Export-Mailbox
 ExMerge was a great way of exporting a mailbox to an Exchange PST file, or for removing all occurences... Read more...

Using Exchange 2007 for Resource Booking
 The process of booking various resources to go with a meeting room just got a whole lot easier with... Read more...

Managing Exchange 2007 Mailbox Quotas with Windows PowerShell
 The use of PowerShell with Exchange Server 2007 can do a great deal to ease the task of managing... Read more...

Over 400,000 Microsoft professionals subscribe to the Simple-Talk technical journal. Join today, it's fast, simple, free and secure.

Join Simple Talk