{"id":306,"date":"2009-02-16T16:52:06","date_gmt":"2009-02-16T16:52:06","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=306"},"modified":"2009-11-18T08:35:08","modified_gmt":"2009-11-18T08:35:08","slug":"exchange-2007-cross-forest-migration","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/exchange-2007-cross-forest-migration","title":{"rendered":"Exchange 2007 Cross-Forest Migration"},"content":{"rendered":"<p>This is a follow-up to the post about <a href=\"https:\/\/www.wapshere.com\/missmiis\/?p=299\">renaming a domain with Exchange 2007<\/a>, which you actually can&#8217;t do as it turns out, so this became a migration to a new forest.<\/p>\n<p>I was mostly working on the mailbox migration, so this post only covers Exchange 2007 to 2007 cross-forest migration.<!--more--><\/p>\n<p><strong>Migrate Users<\/strong><\/p>\n<p>ADMT was used to migrate the user accounts. The only really important thing to note here is that you <em>must migrate the\u00c2\u00a0SIDs <\/em>otherwise the mailbox owner will not be recognised\u00c2\u00a0by move-mailbox.<\/p>\n<p><strong>Move-mailbox<\/strong><\/p>\n<p>I had various errors, which I have listed below, but eventually managed to get the migration working with the following script.<\/p>\n<p><code><br \/>\n$s = get-credential<br \/>\n$t = get-credential<br \/>\nGet-Content \"mailbox.txt\" | Get-Mailbox -DomainController oldDC.oldDomain.local -Credential $s | move-mailbox -TargetDatabase \"CN=Mailbox Database,CN=First Storage Group,CN=Information Store,CN=newExchServer,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=newDomain,DC=local\" -SourceForestGlobalCatalog oldDC.oldDomain.local -GlobalCatalog newDC.newDomain.local -DomainController newDC.newDomain.local -SourceMailboxCleanupOptions none -SourceForestCredential $s -TargetForestCredential $t -Confirm:$false<\/code><\/p>\n<p>The <strong>mailbox.txt<\/strong> file contains a list of UPNs, one per line.<\/p>\n<blockquote><p>\u00c2\u00a0Hint: To find your mail database FQDN use ADSIEdit to bind to the Configuration partition in the destination AD.<\/p><\/blockquote>\n<p><strong>Troubleshooting<\/strong><\/p>\n<p>1.\u00c2\u00a0 &#8220;Failed to reconnect to Active Directory.&#8221;<\/p>\n<p>-&gt;\u00c2\u00a0 This post helped me get the script right and eradicate this error: <a href=\"http:\/\/forums.msexchange.org\/m_1800493015\/tm.htm\">http:\/\/forums.msexchange.org\/m_1800493015\/tm.htm<\/a><\/p>\n<p>2.\u00c2\u00a0 \u00c2\u00a0&#8220;MapiExceptionNetworkError: Unable to make admin interface connection to server.&#8221;<\/p>\n<p>-&gt; Don&#8217;t use administrator.\u00c2\u00a0Create a dedicated migration account in both forests and give it the following permissions:<\/p>\n<ul>\n<li>Exchange Recipient Administrator in both forests,<\/li>\n<li>Exchange Server Administrator on all source and destination servers,<\/li>\n<li>Local admin on\u00c2\u00a0all source and destination\u00c2\u00a0servers,<\/li>\n<li>Domain Admins both forests (I didn&#8217;t expect to have to do this &#8211; but see\u00c2\u00a0the next\u00c2\u00a0error).<\/li>\n<\/ul>\n<p>3.\u00c2\u00a0 &#8220;Error occurred in the step: Updating attributes. Access denied.&#8221;<\/p>\n<p>-&gt; This was fixed by adding the Domain Admins membership in both domains. I then also found I had to restart the Exchange Management Shell.<\/p>\n<p>\u00c2\u00a04.\u00c2\u00a0 &#8220;Failed to set basic mailbox information, will retry in 60 seconds&#8221;.<\/p>\n<p>-&gt; If you wait the 60 secs it should then work. This happens because the destination mailbox does not yet exist. For a workaround, create all the destination mailboxes using enable-mailbox and then add the -AllowMerge option to the script above.<\/p>\n<p>5.\u00c2\u00a0 &#8220;Error occurred in the step:Approving object. No matched target NT account is found.&#8221;\u00c2\u00a0<\/p>\n<p>-&gt; This will happen if you have neglected to migrate the SIDs with ADMT, or if you created new accounts in the destination domain.<\/p>\n<p>For some reason\u00c2\u00a0I got this error\u00c2\u00a0with all the resource mailbox accounts, despite SID migration having been used. As we weren&#8217;t worried about profiles or passwords I ended up deleting the accounts from the destination domain, and then modifying the script above to include the\u00c2\u00a0-NTAccountOU option. This allowed move-mailbox to create new accounts and migrate the mailboxes.<\/p>\n<p>6.\u00c2\u00a0 Not really an error but IT TOOK A BLOODY LONG TIME! We were really unprepared by how slow it was. As the servers were on a dedicated server VLAN with 100 MBit cards we thought it would be pretty fast &#8211; but it took over 12 hours to move 50GB. There are probably other factors here &#8211; such as the source server being a VM &#8211; but still!<\/p>\n<p>7.\u00c2\u00a0 And in a similar vein: <em>watch the transaction logs on the destination server<\/em>. I thought I was all prepared for this one and started the day with a Full backup when the server was empty, to follow with incrementals at intervals throughout the day. But at some point I overwrote the existing backup rather than appending, and from that point Exchange helpfully hung on to its trillions of logs. I then had to wait a couple of hours for a full backup to complete so that I could finish migrating the last few mailboxes &#8211; Ugh!<\/p>\n<p>8. Distribution Lists: ADMT migrated the groups and their members, but the mail alias went missing along the way. I had to export all the aliases using get-distributiongroup in the old domain, and then update the groups using enable-distributiongroup in the new domain.<\/p>\n<p>9. Outlook 2003 had to be manually reconfigured to connect to the new server. It should be possible to script this in the login script, and there are various vbscripts out there on the internet, but the guys who were doing this part said they couldn&#8217;t get it to work, so in the end they did them all manually as the users arrived on Monday morning.<\/p>\n<p>10.\u00c2\u00a0 While all the mailbox delegations were imported (even for those resource mailboxes which I had to recreate) we noticed that the delegates appeared with a question mark over the icon in Exchange Management Console &#8211; however the delegations seemed to be working fine. I couldn&#8217;t find anything about this question mark icon. Our best guess was that it was connected to the SID migration and SID history &#8211; essentially that the delegation was made with a historical SID.<\/p>\n<p><strong>Certificates<\/strong><\/p>\n<p>I&#8217;m not going to go into this in any great detail, mostly because I don&#8217;t understand it all that well, and don&#8217;t particularly want to.<\/p>\n<p>We had to install a new CA server into the new domain, which meant a whole lot of other certs being recreated and reinstalled. That was a variously hair-tearing experience, depending on the application.<\/p>\n<p>For Exchange it wasn&#8217;t too hard. I created a new Web Server cert and changed the default one using remove-exchangecertificate, import-exchangecertificate and enable-exchangecertificate. There&#8217;s a nice walkthrough <a href=\"http:\/\/blogs.microsoft.co.il\/blogs\/roneng\/archive\/2008\/03\/20\/create-certificate-for-exchange-2007-servers-using-windows-ca.aspx\">here<\/a>.<\/p>\n<p>It was also necessary to import a couple of certs into the Local Computer store on the ISA 2006 server:<\/p>\n<ul>\n<li>The root cert from the new CA had to be imported into Trusted Root Authorites, and<\/li>\n<li>The new Exchange server cert had to be imported into Personal.<\/li>\n<\/ul>\n<p>After that it was just a matter of changing the OWA and ActiveSync configurations to reference the new Exchange server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a follow-up to the post about renaming a domain with Exchange 2007, which you actually can&#8217;t do as it turns out, so this became a migration to a new forest. I was mostly working on the mailbox migration, so this post only covers Exchange 2007 to 2007 cross-forest migration.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[26],"tags":[],"class_list":["post-306","post","type-post","status-publish","format-standard","hentry","category-exchange2007"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-4W","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=306"}],"version-history":[{"count":14,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/306\/revisions"}],"predecessor-version":[{"id":592,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/306\/revisions\/592"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}