{"id":582,"date":"2009-05-08T00:00:00","date_gmt":"2009-05-08T00:00:00","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/emulating-the-exchange-2003-rus-for-out-of-band-mailbox-provisioning-in-exchange-2007\/"},"modified":"2024-08-30T09:58:03","modified_gmt":"2024-08-30T09:58:03","slug":"emulating-the-exchange-2003-rus-for-out-of-band-mailbox-provisioning-in-exchange-2007","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/sysadmin\/general\/emulating-the-exchange-2003-rus-for-out-of-band-mailbox-provisioning-in-exchange-2007\/","title":{"rendered":"Emulating the Exchange 2003 RUS for Out-of-Band Mailbox Provisioning in Exchange 2007"},"content":{"rendered":"<div id=\"pretty\">\n<p>Exchange 2000 and Exchange 2003 included a component known as the Recipient Update Service or RUS.&#160; The RUS runs as a sub-process of the System Attendant, and is responsible for discovering partially provisioned mailboxes and fully provisioning them.&#160; 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.&#160; 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.<\/p>\n<p>Many Exchange administrators who have worked with Exchange 2000 or 2003 will have experienced times when the RUS hasn&#8217;t worked at all or has worked slowly, and as a result have had problems with mailbox provisioning or updates.<\/p>\n<p>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.&#160; 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.&#160; <\/p>\n<p>For example, in Exchange 2003 it&#8217;s possible to cause a mailbox to be provisioned simply by setting the LegacyExchangeDN, Mailnickname, and homeMDB attributes on a user object.&#160; The RUS will find the user account and will finish provisioning the mailbox.&#160; If you try this with Exchange 2007 you won&#8217;t get a usable mailbox <\/p>\n<p>Fortunately, there is a way to emulate the Exchange 2000\/2003 RUS on Exchange 2007 using two Exchange 2007 PowerShell cmdlets, <b>Update-EmailAddressPolicy<\/b> which will apply an email address policy to mailboxes, and <b>Update-AddressList<\/b> which will update address list memberships.&#160; <\/p>\n<p>The easiest way to run the &#8220;update&#8221; cmdlets is to pipe input to them from the &#8220;get&#8221; cmdlets.&#160; These commands will update all email address policies and address lists:<\/p>\n<pre>Get-EmailAddressPolicy | Update-EmailAddressPolicy\nGet-AddressList | Update-AddressList\n<\/pre>\n<p>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 &#8220;Legacy Mailbox&#8221;.&#160; A legacy mailbox will still function for sending and receiving email, but it&#8217;s not possible to enable or disable Exchange 2007 features such as Messaging Records Management or Unified Messaging.&#160; Legacy mailboxes can be converted to Exchange 2007 mailboxes using the <b>Set-Mailbox<\/b> cmdlet with the &#8211;<i>ApplyMandatoryProperties<\/i> parameter.<\/p>\n<p>If your Exchange environment has only Exchange 2007 servers this command will update all legacy mailboxes to Exchange 2007 mailboxes:<\/p>\n<pre>Get-Mailbox -RecipientTypeDetails LegacyMailbox | Set-Mailbox -ApplyMandatoryProperties\n<\/pre>\n<p>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.&#160; This command will do that by first getting only the Exchange 2007 servers then finding all the legacy mailboxes on those servers:<\/p>\n<pre class=\"theme:ssms2012 lang:tsql\">Get-ExchangeServer | \nWhere{$_.AdminDisplayVersion.ToString().SubString(0, 10) -eq\"Version 8.\"} | ForEach{ Get-Mailbox -Server $_.Name -RecipientTypeDetails LegacyMailbox | Set-Mailbox -ApplyMandatoryProperties} \n\n\n<\/pre>\n<p>The same problem exists for changes made to users outside of the Exchange Management tools.&#160; Any changes made within the Exchange 2007 tools are instantly reflected in the user&#8217;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 &#8220;update&#8221; commands are run.<\/p>\n<p>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.&#160; 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&#8217;s Exchange email addresses.<\/p>\n<p>This problem can also be solved by running the <b>Update-EmailAddressPolicy<\/b> and <b>Update-AddressList<\/b> cmdlets.<\/p>\n<p>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&#8217;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):<\/p>\n<pre>Get-EmailAddressPolicy | Update-EmailAddressPolicy\nGet-AddressList | Update-AddressList\nGet-Mailbox -RecipientTypeDetails LegacyMailbox | Set-Mailbox -ApplyMandatoryProperties\n<\/pre>\n<p>To run the <b>Update-EmailAddressPolicy<\/b> cmdlet you need to be delegated the Exchange Server Administrator role and have local Administrators rights for the Exchange server. To run <b>Update-AddressList<\/b> you need to be delegated the Exchange Organization Administrator role.&#160; To run the <b>Set-Mailbox <\/b>cmdlet you need to be delegated the Exchange Recipient Administrator role.<\/p>\n<p>More Information on the cmdlets can be found on the Microsoft TechNet website:<\/p>\n<ul>\n<li>Update-EmailAddressPolicy &#8211; <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/aa996869.aspx\">http:\/\/technet.microsoft.com\/en-us\/library\/aa996869.aspx<\/a>  <\/li>\n<li>Update-AddressList &#8211; <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/aa997982.aspx\">http:\/\/technet.microsoft.com\/en-us\/library\/aa997982.aspx<\/a>  <\/li>\n<li>Set-Mailbox &#8211; <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/bb123981.aspx\">http:\/\/technet.microsoft.com\/en-us\/library\/bb123981.aspx<\/a> <\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Exchange&#8217;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.&hellip;<\/p>\n","protected":false},"author":221845,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[32],"tags":[4242,4949,4869,4946,4947,4945,4635,4948,4871],"coauthors":[],"class_list":["post-582","post","type-post","status-publish","format-standard","hentry","category-general","tag-basics","tag-ben-lye","tag-exchange","tag-exchange-2000","tag-exchange-2003","tag-exchange-recipient-update-service","tag-powershell","tag-rus","tag-sysadmin"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/221845"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=582"}],"version-history":[{"count":4,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/582\/revisions"}],"predecessor-version":[{"id":40102,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/582\/revisions\/40102"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=582"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}