Share via


Exchange 2010 Set-Databaseavailabilitygroup -Alternatewitnessserver Settings Cannot Be Removed Through Powershell

I ran into this scenario a few weeks ago...

Customer installs Exchange 2010 and creates a Database Availability Group

Customer sets the AlternateWitnessServer and the AlternateWitnessDirectory parametersby using the set-databaseavailabilitygroup command.

Once a customer uses the -alternatewitnessserver and -alternatewitnessdirectory parameters to set values and decides to remove them there is no way in powershell to remove if they want to change their configuration.

If the customer tries to enter $Null for these parameters you may get "The command completed successfully but no settings of "DAGNAME" have been modified."

***If you use the same commands above with $NULL and there is not a server set already the process will find a witness server (hub server) for you the same as when you build a dag and do not specify a witness server. 

The logic for the command to set these two parameters does not have the ability to remove entries. If you set $Null it will actually find a Hub server and load it for you as the witness server. 

Currently you can only remove the alternatewitnessserver and alternatewitnessdirectory by using ADSIEDIT.

Open adsiedit.msc

Browse through the configuration context to Configuration>Services>Microsoft Exchange>ORGname>Administrative Group>AGname>Database Availability Groups>Dagname

If you check the properties of the DAG you can change the following values:

msExchAlternateFileShareWitness - change to <not set> by clearing the values

msExchAlternateFileShareWitnessDirectory - change to <not set> by clearing the values