How to Upgrade from Exchange 2007 to Exchange 2013: Part 2 =========================================================== 1. Prepare Exchange 2013 for the Switchover: 1.1 Rename Exchange 2013 DB; Set default OAB for the Exchange 2013 DB 1.2 Move Exchange 2013 DB and Logs to separate Volumes #In this example we use "MBX1-13" as the name of Exchange 2013 DB #Volume "D" is for Exchange Databases; Volume "E" - for Exchange Logs Move-Databasepath "MBX1-13" –EdbFilepath "D:\MBX1-13\MBX1-13.edb" –LogFolderpath "E:\MBX1-13" 1.3 Add Exchange 2013 to the exiting Internet Send Connector 1.4 Configure Relay connector for Applications/Devices (if there are such conn. on Exchange 2007) 1.5 Import Exchange 2007 transport rules #In Part 1, we've exported Exchange 2007 Transport rules to an XML file with the command: #(must be run in Exchange 2007 Management Shell) Export-TransportRuleCollection -FileName ExportedRules.xml #Importing the XML file is performed in Exchange 2013 management Shell: [Byte[]]$Data=Get-Content -Path ExportedRules.xml -Encoding Byte -ReadCount 0 Import-TransportRuleCollection -FileData $Data 2 Configure Exchange 2013 URL 2 Configure Exchange 2013 URL 2.1 Configure Exchange 2013 External URL 2.2 Configure Exchange 2013 Internal URL $PubName = "mail.netometer.com" $AutoName = "autodiscover.netometer.com" $Ex13 = "Ex-13.netometer.local" $Ex2k7 = "Ex-2k7.netometer.local" $LegacyName = "legacy.netometer.com" Get-ClientAccessServer -Identity $Ex13 | FL *Uri Get-ClientAccessServer -Identity $Ex13 | Set-ClientAccessServer -AutoDiscoverServiceInternalUri "https://$PubName/Autodiscover/Autodiscover.xml" Get-EcpVirtualDirectory -Server $Ex13 | FL *URL Get-WebServicesVirtualDirectory -Server $Ex13 | FL *URL Get-ActiveSyncVirtualDirectory -Server $Ex13 | FL *URL Get-OabVirtualDirectory -Server $Ex13 | FL *URL Get-OWAVirtualDirectory -Server $Ex13 | FL *ternalURL Get-PowerShellVirtualDirectory -Server $Ex13 | FL *URL Get-OutlookAnywhere -Server $Ex13 | FL Server,*hostname,*Method,*RequireSSL 3 Request and Install a new GoDaddy Multiple Domain Certificate (UCC) 3.1 Generate and submit a new CSR 3.2 Download, install, and enable the new UCC in Exchange 2013 ### First export the PFX, then assign the services and close EAC ### 3.3 Export the UCC to a PFX file. 4 Install the new UCC in Exchange 2007 4.1 Just Install the new UCC in Exchange 2007 #DO NOT replace immediately the old certificate and assign services to the new UCC 4.2 Configure Split DNS 4.3 Add legacy namespace to the Public DNS zone 5. Configure Exchange 2007 External and Internal URL 5.1 Check: OutlookAnywhere - mail/OAB -legacy:legacy/ActiveSync -legacy:legacy/OWA - legacy:legacy/Outlook Anywhere IPv6 (ping should return IPv4 address) 5.2 SCP and Web Services in EM Shell $PubName = "mail.netometer.com" $LegacyName = "legacy.netometer.com" $Ex2k7 = "Ex-2k7.netometer.local" Get-OutlookAnywhere -Server $Ex2k7 | FL Server,*hostname,*Method,IIS*,SSL* Get-OutlookAnywhere -Server $Ex2k7 | Set-OutlookAnywhere -IISAuthenticationMethods Basic,NTLM Get-ClientAccessServer -Identity $Ex2k7 | FL *Uri Get-ClientAccessServer -Identity $Ex2k7 | Set-ClientAccessServer -AutoDiscoverServiceInternalUri "https://$PubName/Autodiscover/Autodiscover.xml" Get-WebServicesVirtualDirectory -Server $Ex2k7 | FL *url Get-WebServicesVirtualDirectory -Server $Ex2k7 | Set-WebServicesVirtualDirectory -InternalUrl "https://$LegacyName/EWS/Exchange.asmx" -InternalNLBBypassUrl "https://$LegacyName/EWS/Exchange.asmx" -ExternalUrl "https://$LegacyName/EWS/Exchange.asmx" Get-UMVirtualDirectory -Server $Ex2k7 | FL *URL Get-UMVirtualDirectory | Set-UMVirtualDirectory -InternalUrl https://$LegacyName/UnifiedMessaging/Service.asmx -ExternalUrl https://$LegacyName/UnifiedMessaging/Service.asmx #Check #Pointing to legacy namespace Get-ActiveSyncVirtualDirectory -Server $Ex2k7 | FL *URL Get-OabVirtualDirectory -Server $Ex2k7 | FL *URL Get-OWAVirtualDirectory -Server $Ex2k7 | FL *URL Get-WebServicesVirtualDirectory -Server $Ex2k7 | FL *url Get-UMVirtualDirectory -Server $Ex2k7 | FL *URL #Pointing to Exchange 2013 Get-ClientAccessServer -Identity $Ex2k7 | FL *InternalUri Get-OutlookAnywhere -Server $Ex2k7 | FL Server,*hostname,*Method,IIS*,SSL* 6. The Switchover 6.1 Restart Exchange 2013 (wait until CPU ut. drops down & make sure all services are started) 6.2 Enable the new Exchange Multiple Domain Certificate Get-ExchangeCertificate Enable-ExchangeCertificate IISRESET 6.3 Check Internal/Domain clients - Check OWA internally and confirm the new certificate - Confirm that Exchange 2013 provides successfully the correct Autodiscover.xml 6.4 Modify the firewall configuration - Forward IP1:mail.netometer.com/TCP Ports 25 and 443 to Exchange 2013 - Forward IP2:legacy.netometer.com/TCP Port 443 to Exchange 2007 6.5 Check remote clients - OWA - Outlook Anywhere - WebServices (Outlook 2011) - Mobile devices 7. Moving the Mailboxes #Creating a CSV file Get-Mailbox -Database "Mailbox Database" | select WindowsEmailAddress Get-Mailbox -Database "Mailbox Database" | where {$_.OrganizationalUnit -eq "netometer.local/SLO Development"} | select WindowsEmailAddress Get-Mailbox -Database "Mailbox Database" | where {$_.OrganizationalUnit -eq "netometer.local/SLO Development"} | select WindowsEmailAddress | Export-Csv SLO-Dev.csv #Using Exchange Management Shell & New-MoveRequest commandlet Get-Mailbox -Database "Mailbox Database" -ResultSize Unlimited | New-MoveRequest -TargetDatabase "MBX1-13" -WhatIf Get-Mailbox -Database "Mailbox Database" -ResultSize Unlimited | New-MoveRequest -TargetDatabase "MBX1-13" Get-MoveRequestStatistics -MoveRequestQueue "MBX1-13" Get-MoveRequest | where {$_.status -eq "Queued"} Get-MoveRequest | where {$_.status -eq "Completed"} Get-MoveRequest | where {$_.status -ne "Completed"} Get-MoveRequest | where {$_.status -eq "Completed"} | Remove-MoveRequest 8. Moving the Public Folders #This must be run on the Legacy Exchange 2007 server ==================================================== #1. A snapshot of the original source folder structure: Get-PublicFolder -Recurse | Export-CliXML Legacy_PFStructure.xml #2. A snapshot of public folder statistics such as item count, size, and owner: Get-PublicFolderStatistics | Export-CliXML Legacy_PFStatistics.xml #3. A snapshot of the permissions: Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CliXML Legacy_PFPerms.xml #Exchange 2007 PF Prereq. checks: #4. On Exchange 2007, to locate public folders that have a backslash in the name, run the following command: Get-PublicFolderDatabase | ForEach {Get-PublicFolderStatistics -Server $_.Server | Where {$_.Name -like "*\*"}} # and if there are PF with "\", rename them with: (!!!! the PF identity) Set-PublicFolder -Identity ############# -Name #5. Check for previous successful PF migration: Get-OrganizationConfig | Format-List PublicFoldersLockedforMigration, PublicFolderMigrationComplete #If the result for any of these values is true, set them back to false: Set-OrganizationConfig -PublicFoldersLockedforMigration:$false -PublicFolderMigrationComplete:$false #This must be performed on Exchange 2013 (PF prereq. cheks): ============================================================ #1. Check for existing PF migration request: Get-PublicFolderMigrationRequest #and if there is one, set it to FALSE: Get-PublicFolderMigrationRequest | Remove-PublicFolderMigrationRequest -Confirm:$false #2. Confirm that there are no existing PF on Exchange 2013: Get-Mailbox -PublicFolder Get-PublicFolder #and if there are existing PF , remove them with: Get-MailPublicFolder | where $_.EntryId -ne $null | Disable-MailPublicFolder -Confirm:$false Get-PublicFolder -GetChildren \ | Remove-PublicFolder -Recurse -Confirm:$false Get-Mailbox -PublicFolder |Remove-Mailbox -PublicFolder -Confirm:$false #Generate the CSV mapping files #This must be performed on the legacy Exchange 2007 server =========================================================== #PF Migration scripts are available in Exchange 2013 $ExScripts folder #It is recommended to download the latest, updated version of the scripts: http://www.microsoft.com/en-us/download/details.aspx?id=38407 #1. First, we need to create [folder name]-to-[folder size] mapping file (PFstatistics): .\Export-PublicFolderStatistics.ps1 PFstatistics.csv Ex-2k7.netometer.local #2. Then, we can use the generated file to create a [public folder]-to-[PF Mailbox mapping] file: #Only the second CSV mapping file is what we need on Exchange 2013 to create the required PF MBXs .\PublicFolderToMailboxMapGenerator.ps1 2GB PFstatistics.csv FolderToMbx.csv #1. On Exchange 2013 create the required PF MBXs ============================================= #The MBX names (ex. PF-MBX1/2/3/4/5) must match the names in the "FolderToMbx.csv" file #Just the first PF MBX is set with "-HoldForMigration:$true" (the Primary hierarchy MBX) #All PF MBXs are set with "-IsExcludedFromServingHierarchy:$true" New-Mailbox -PublicFolder PF-MBX1 -HoldForMigration:$true -IsExcludedFromServingHierarchy:$true New-Mailbox -PublicFolder PF-MBX2 -IsExcludedFromServingHierarchy:$true New-Mailbox -PublicFolder PF-MBX3 -IsExcludedFromServingHierarchy:$true New-Mailbox -PublicFolder PF-MBX4 -IsExcludedFromServingHierarchy:$true New-Mailbox -PublicFolder PF-MBX5 -IsExcludedFromServingHierarchy:$true #2. Submit a PF Migration request: New-PublicFolderMigrationRequest -SourceDatabase (Get-PublicFolderDatabase -Server Ex-2k7.netometer.local) -CSVData (Get-Content FolderToMbx.csv -Encoding Byte) -BadItemLimit 5 #3. Check status of the migration: Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics #and details: Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics -IncludeReport | Format-List # When status reaches autosuspended, # Lock down the public folders on the legacy Exchange server for final migration: # If a long time has passed since the autosuspended status has been reached, # and lot of new PF data exists which is not synced, perform one more sync before locking PF: Resume-PublicFolderMigrationRequest \PublicFolderMigration #Optionally, restart Exchange 2007 to force the PF lock and speed up the process #4. Lock PF - on the Legacy Server: =================================== Set-OrganizationConfig -PublicFoldersLockedForMigration:$true #On Exchange 2013: ====================== Set-PublicFolderMigrationRequest -Identity \PublicFolderMigration -PreventCompletion:$false Resume-PublicFolderMigrationRequest -Identity \PublicFolderMigration #Test and unlock the PF Migration Set-Mailbox -Identity Administrator -DefaultPublicFolderMailbox PF-MBX1 #If you have more than one PF Mailboxes and everything looks fine: Get-Mailbox -PublicFolder | Set-Mailbox -PublicFolder -IsExcludedFromServingHierarchy:$false #On Exchange 2007 Server ======================== Set-OrganizationConfig -PublicFolderMigrationComplete:$true #Final Check of Public Folders #On Exchange 2013: ============================== #1. A snapshot of the original source folder structure: Get-PublicFolder -Recurse | Export-CliXML New_PFStructure.xml #2. A snapshot of public folder statistics such as item count, size, and owner: Get-PublicFolderStatistics | Export-CliXML New_PFStatistics.xml #3. A snapshot of the permissions: Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CliXML New_PFPerms.xml