How to Move File Share Witness in Exchange DAG?

Shelly Bhardwaj
5 min readSep 23, 2022

--

Exchange Server high availability setup is allowed using the Database Availability Group (DAG) setup. This involves a setup of cluster of 2 or more Exchange Servers. However, this doesn’t mean that this will work with even amount of Exchange Servers as the cluster requires an object to determine the cluster’s vote majority. In some cases, you can add another Exchange Server. But a File Share Witness can be setup to have the odd number of nodes. This will reduce setup, maintenance, and licenses cost as all you need is a file share.

A typical File Share Witness setup looks like the given below.

In this article, we will be going through the process of moving the File Share Witness to another server. The same procedure can be followed for both setups of Database Availability Group (DAG) which are IP-Less/Active Directory Detached or with an Administrative Access Point.

Configuration of the Cluster Quorum

You must first confirm that the File Share Witness is not a required resource to keep the cluster up. If the File Server goes down, this should not affect the quorum and the cluster should continue running. You need to check that both nodes of Exchange Server are up and there are no issues. This can be done using the Get-ClusterNode command (see below). If a node is down or has any issues and you remove the File Share Witness, the whole cluster will go down.

Get-ClusterNode

Confirm the Current File Share Witness

Since you have to first remove the current witness server, you need to confirm the current File Share Witness. This can be done using the Get-DatabaseAvailabilityGroup PowerShell command with the -Status parameter and the filter with the witness word (see below). This command can also reveal if you have multiple witnesses to the same cluster and you don’t want to remove the wrong one.

Get-DatabaseAvailabilityGroup -Status | fl *witness*

After the confirmation, you can proceed to the setup of the folder to ensure that everything is ready to move the witness to the new server.

Setting up the File Share for the Witness

You cannot just create a shared folder and use it on the new server. You need to create the folder and set the permissions accordingly so that the cluster and the Exchange Server have the right permissions. After creating the folder in the directory, you need to set the right permissions. Although it would work, it is recommended to have the File Share Witness role on a server which is not an Active Directory Server. This step can be automatically done in the migration part. However, if you need to create it manually, follow the below steps.

Note: If you want the folder to be created automatically, then add the Exchange Trusted Subsystem to the Administrators group on the destination server.

· Right-click on the folder.

· Click on Properties.

· Click on the Sharing tab and click on Advanced Sharing.

· Enable Share this folder.

· Change the Share name if you want to change the name of the share.

· Click on the Permissions button.

· Remove Everyone.

· Add the Administrator account with Full Control.

· Add the Domain Admins group with Full Control.

· Add the Exchange Trusted Subsystem with Full Control.

Now, you can use the server and share accordingly to serve as the File Share Witness.

Moving the File Share Witness

Now that you have all set up, you can go ahead to move the current File Share Witness. For this operation, you need to use the Set-DatabaseAvailabilityGroup PowerShell command as given below.

Set-DatabaseAvailabilityGroup -Identity <DAG name> -WitnessServer <New Server name> -WitnessDirectory <Share folder path>

The Identity is the Database Availability Group name, the WitnessServer is the new server’s name which hosts the share, and the WitnessDirectory is the full path to the file (For example — C:\Scripts).

If you opted for the automatic creation of the folder, the folder will be automatically shared and created in the new server. You can also confirm that the change is successful by running the following command.

Get-DatabaseAvailabilityGroup -Status | fl *witness*

Closing Notes

If all went well and the move was successful, you can go ahead and delete the folder from the old server and close the share. There could be issues that may arise during the move, such as an Exchange Server might go down during the operation and the cluster could shut down since it loses the voting majority. In addition, there could be other things that could affect the Exchange Server setup, like hardware issues or sudden loss of power.

It is recommended to have the right tool that could assist in situations where the Exchange Server databases or transaction logs get corrupted. One tool that can restore and recover all the Exchange Server data is Stellar Repair for Exchange. Exchange Database Recovery Software can repair corrupted Exchange Server database with no size limit. It can export recovered database to PST and export directly to a new Exchange Server live database. If offers features such as automatic or manual mailbox matching, priority recovery options, continuation in case of interruption of export, and parallel recovery.

--

--

Shelly Bhardwaj
Shelly Bhardwaj

Written by Shelly Bhardwaj

I am a Product Consultant and is associated with Stellar Data Recovery from last 8 years. I write about Exchange Server, Office 365, Outlook, and other topics.

No responses yet