You want to create mailboxes in Exchange Online and use Office 365. Before you can…
Server switchover Exchange 2016 PowerShell
Perform a server switchover in Exchange 2016 through PowerShell. Why do you need to perform a server switchover? For example, you want to update your Exchange Server. First, move the mounted databases to another Exchange Server. After you moved the databases, update and reboot the Exchange Server. In this guide, you will learn how to perform a server switchover in Exchange 2016. You will perform the server switchover through Exchange Management Shell (EMC). Have a read on my previous article if you want to perform a server switchover Exchange 2016 through EAC.
Table of contents
Prepare information
First, let’s list the Exchange Servers in the organization. Run Exchange Management Shell as administrator. Run the following command.
1 2 3 4 5 6 |
[PS] C:\>Get-ExchangeServer | Format-Table Name, Serverrole, Edition, AdminDisplayVersion Name ServerRole Edition AdminDisplayVersion ---- ---------- ------- ------------------- EX01 Mailbox Enterprise Version 15.1 (Build 1847.3) EX02 Mailbox Enterprise Version 15.1 (Build 1847.3) |
We have two Exchange Server 2016 in the organization.
Second, let’s list the databases. We can see on which Exchange Server the databases are mount. We are going to sort on Server Name.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[PS] C:\>Get-MailboxDatabase -Status | sort Server | Format-Table Name, Server, Mounted Name Server Mounted ---- ------ ------- DB15-2016 EX01 True DB4-2016 EX01 True DB17-2016 EX01 True DB16-2016 EX01 True DB20-2016 EX01 True DB1-2016 EX01 True DB3-2016 EX01 True DB9-2016 EX01 True DB6-2016 EX01 True DB14-2016 EX02 True DB13-2016 EX02 True DB12-2016 EX02 True |
Three databases are mount on the Exchange Server 2016 EX02.
We want to list the databases only on a particular Exchange Server. We are going to sort on Database Name.
1 2 3 4 5 6 7 |
[PS] C:\>Get-MailboxDatabase -Status | ? {$_.server -like "EX02"} | sort Name | Format-Table Name, Server, Mounted Name Server Mounted ---- ------ ------- DB12-2016 EX02 True DB13-2016 EX02 True DB14-2016 EX02 True |
Correct output. Three databases are on the Exchange Server EX02. Now that you know which Exchange Servers are in the organization. You can proceed further to perform a server switchover.
Server switchover Exchange 2016 through PowerShell
We want to move all the databases from Exchange Server EX02 to Exchange Server EX01.
1 2 3 4 5 6 7 |
[PS] C:\>Move-ActiveMailboxDatabase -Server EX01 -ActivateOnServer EX02 Identity ActivateServerAtStart ActivateServerAtEnd Status NumberOfLogsLost RecoveryPointObjective MountStatusAtMoveStart MountStatusAtMoveEnd -------- --------------------- ------------------- ------ ---------------- ---------------------- ---------------------- -------------------- DB12-2016 EX02 EX01 Succeeded 0 2-2-2020 18:10:09 Mounted Mounted DB13-2016 EX02 EX01 Succeeded 0 2-2-2020 18:10:09 Mounted Mounted DB14-2016 EX02 EX01 Succeeded 0 2-2-2020 18:10:09 Mounted Mounted |
Verify server switchover Exchange 2016
After the switchover, we like to verify if the move went great.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[PS] C:\>Get-MailboxDatabase -Status | sort Server | Format-Table Name, Server, Mounted Name Server Mounted ---- ------ ------- DB14-2016 EX01 True DB13-2016 EX01 True DB12-2016 EX01 True DB17-2016 EX01 True DB16-2016 EX01 True DB15-2016 EX01 True DB6-2016 EX01 True DB1-2016 EX01 True DB3-2016 EX01 True DB4-2016 EX01 True DB20-2016 EX01 True DB9-2016 EX01 True |
All the databases are active on the Exchange Server EX01.
Conclusion
You learned how to perform a server switchover in Exchange 2016 through PowerShell. Prepare before you start the switchover. I hope this article was informative to you. If you enjoyed this article, you may like Pagefile Exchange 2013/2016 best practice. Don’t forget to follow us and share this article.
This Post Has 0 Comments