With all of the services and data migrated to Exchange Server 2013 we can begin the removal of the legacy Exchange servers from the organization.
Exchange servers must be correctly uninstalled from an organization to avoid future issues due to orphaned objects. It is not enough to simply shut down the server.
Aside from your own regular server decommissioning steps such as taking a final backup, removing from monitoring systems, disposing of hardware etc, the Exchange Server application itself needs to go through a few simple decommissioning steps. These will depend on the server roles that were installed, but can generally be broken down as follows.
Note: When you remove the last Exchange 2010 server from the organization any Exchange 2010 management tools (eg on admin workstations) will stop working (although the management shell may still connect to Exchange 2013 servers). This may seem obvious, but I have seen people be surprised by this. By the time you are removing the last Exchange 2010 server all of your administrators should be using the Exchange 2013 management tools.
Edge Transport Servers
To decommission an Exchange 2010 Edge Transport server verify that no more mail is flowing through the server. This is achieved by configuring transport and cutting over SMTP namespaces. You can use protocol logs and message tracking logs to verify this.
In a typical case you may still see some traffic hitting the server. This could be due to incoming SMTP connections still hitting the server, eg spammers hitting an open firewall port that still allows access to that server. Or it may be due to the occasional outbound email still routing over that Edge subscription. Review any evidence of ongoing email traffic and either address it or choose to ignore it and proceed with the decommissioning anyway.
Before an Edge Transport server can be uninstalled the Edge Subscription must be removed, which can be done from the Exchange Management Console.
And from the Exchange Management Shell on the Edge Transport server run Remove-EdgeSubscription.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
[PS] C:\>Get–EdgeSubscription
Name Site Domain
—— —— ———
HO–EX2010–EDGE exchangeserverpro...
[PS] C:\>Remove–EdgeSubscription HO–EX2010–EDGE
Confirm
Are you sure you want to perform this action?
Removing Edge Subscription “HO-EX2010-EDGE”.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “Y”): y
Confirm
Do you want to remove recipients? You don‘t need to remove the recipients that have already synchronized to this Edge
server if you will re–subscribe it to the same organization. This would improve the performance of Edge synchronization
when you re–subscribe.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “Y”): y
|
Launch the uninstall from Programs and Features in the Control Panel. If the readiness check passes you can click Uninstall to complete the process.
Client Access Servers
Client Access servers can be removed when they are no longer serving any client requests. This is achieved by completing the cutover of the client access namespaces to Exchange Server 2013.
You can verify that no more traffic is hitting the Client Access server by reviewing the IIS logs on the server. Note that you will likely see continued hits in the logs from the Exchange 2013 servers themselves, or from any connections to the /PowerShell virtual directory by administrators.
If there is too much log data to analyse visually you can use Log Parser to determine which users (if any) are still making connections to the server. For example:
1
2
3
4
5
6
7
8
9
10
11
12
|
C:\Program Files (x86)\Log Parser 2.2\>logparser “select Count(cs-username) as Count, cs-username as Username from ‘C:\inetpub\logs\logfiles\w3svc1\*.*’ group by Username order by Count(Username)” –i:IISW3C
Count Username
——– ——————————
0 –
598 ESPNET\Administrator
Statistics:
—————–
Elements processed: 100861
Elements output: 2
Execution time: 0.27 seconds
|
Just be aware that querying a wildcard like ‘C:\inetpub\logs\logfiles\w3svc1\*.*’ will return results from any log file in that directory, which may be months or even years worth of log data. You can refine the search by removing older log files from the directory, or changing the query to only search file names of a smaller date range, eg ‘C:\inetpub\logs\logfiles\w3svc\1u_ex1407*.*’.
If the server is a dedicated Client Access server then you can launch the uninstall from Programs and Features in Control Panel and uninstall it. If it is a multi-role server you may wish to wait until you’ve verified all roles are ready to be uninstalled before doing them all together.
Hub Transport Servers
Hub Transport servers can be removed when there is no more email traffic passing through them, and they are not the source Transport server for any Send Connectors. As with the Edge Transport role you can use protocol logs and message tracking logs to verify this.
Because internal traffic may still be traversing the server you may still see some hits, particularly larger organizations where multiple routes exist between internal sites. The presence of a relay connector on the server could also be an indication that it is still in use by production systems that require SMTP.
But generally speaking, if there are no mailboxes or public folders still in the site, and no DNS aliases still pointing at the site for internal SMTP usage, then you can proceed with the uninstallation.
As a precaution you may consider pausing or stopping the Microsoft Exchange Transport service on the server for a period of time to verify that the server removal will have no impact on production services.
If the server is a dedicated Hub Transport server then you can launch the uninstall from Programs and Features in Control Panel and uninstall it. If it is a multi-role server you may wish to wait until you’ve verified all roles are ready to be uninstalled before doing them all together.
Mailbox Servers
Mailbox servers an be uninstalled when they no longer host mailboxes or public folders, are not members of DAGs, and are not responsible for generating offline address books.
The legacy offline address books can be removed from the organization when there are no more Exchange 2010 mailbox users. Exchange 2013 mailbox users will be using the new OAB created by Exchange 2013 setup.
Public folder databases can be removed if the migration of public folders to Exchange 2013 is complete. You can remove the databases using PowerShell, for example:
1
2
3
4
5
6
7
8
9
|
[PS] C:\>Get–PublicFolderDatabase –Server BR–EX2010–MB | Remove–PublicFolderDatabase
Confirm
Are you sure you want to perform this action?
Removing public folder database “PF-BR-01”.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is “Y”): y
WARNING: The specified database has been removed. You must remove the database file located in C:Program
FilesMicrosoftExchange ServerV14MailboxPF–BR–01PF–BR–01.edb from your computer manually if it exists. Specified
database: PF–BR–01
|
Mailbox databases can be removed if the mailbox migration to Exchange 2013 has been complete. Again, you can use PowerShell to remove them.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
[PS] C:\>Get–MailboxDatabase –Server BR–EX2010–MB
Name Server Recovery ReplicationType
—— ——— ———— ———————–
MB–BR–01 BR–EX2010–MB False None
MB–BR–02 BR–EX2010–MB False None
[PS] C:\>Remove–MailboxDatabase MB–BR–01
Confirm
Are you sure you want to perform this action?
Removing mailbox database “MB-BR-01”.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is “Y”): y
WARNING: The specified database has been removed. You must remove the database file located in
F:DataMB–BR–01MB–BR–01.edb from your computer manually if it exists. Specified database: MB–BR–01
[PS] C:\>Remove–MailboxDatabase MB–BR–02
Confirm
Are you sure you want to perform this action?
Removing mailbox database “MB-BR-02”.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is “Y”): y
WARNING: The specified database has been removed. You must remove the database file located in
F:DataMB–BR–02MB–BR–02.edb from your computer manually if it exists. Specified database: MB–BR–02
|
For DAG members the approach is a little different. The process involves:
- Removing database copies from the server (unless it is the last DAG member hosting the single copy of the databases)
- Removing the server from DAG membership
- Removing the databases from the standalone server
- Uninstalling Exchange from the standalone server
- Removing the DAG object from the organization
For example, removing database copies from HO-EX2010-MB2, first move any active database copies to another DAG member.
1
|
[PS] C:\>Move–ActiveMailboxDatabase –Server HO–EX2010–MB2
|
Verify that the server only hosts passive database copies. You should see no “Mounted” status in this output
1
2
3
4
5
6
7
8
|
[PS] C:\>Get–MailboxDatabaseCopyStatus –Server HO–EX2010–MB2
Name Status CopyQueue ReplayQueue LastInspectedLogTime ContentIndex
Length Length State
—— ——— ————– —————– —————————— ——————
MB–HO–01HO–EX2010–MB2 Healthy 0 0 7/25/2014 10:35:27 AM Healthy
MB–HO–04HO–EX2010–MB2 Healthy 0 0 7/25/2014 10:35:21 AM Healthy
MB–HO–02HO–EX2010–MB2 Healthy 0 0 7/25/2014 3:08:47 PM Healthy
|
Remove the database copies from the server.
1
|
[PS] C:\>Get–MailboxDatabaseCopyStatus –Server HO–EX2010–MB2 | Remove–MailboxDatabaseCopy
|
If you are removing the second last DAG member you’ll first need to turn off DAC mode.
1
|
[PS] C:\>Set–DatabaseAvailabilityGroup –Identity dag–headoffice –DatacenterActivationMode Off
|
Remove the server from the DAG.
1
|
[PS] C:\>Remove–DatabaseAvailabilityGroupServer –Identity dag–headoffice –MailboxServer HO–EX2010–MB2
|
You can then proceed with the uninstall.
When all members have been removed from the DAG you can also remove the DAG object itself.
1
|
[PS] C:\>Remove–DatabaseAvailabilityGroup dag–headoffice
|
Wish all Exchange 2010 servers uninstalled the migration from Exchange 2010 to Exchange 2013 is complete.