Change the windows failover cluster fileshare witness using powershell commands.
Old fileshare : \\truenas\shared-data\cluster-witness\win-cluster
New Fileshare : \\PUNE-DC\shared-data\cluster-witness\win-cluster
Current Witness path : \\witness\shared-data\cluster-witness\win-cluster
#Current Fileshare server "truenas" is added as CNAME record "witness" in DNS. Hence we will update the CNAME to
new server "PUNE-DC" and then we will reconfigure the Fileshare witness using powershell
Steps:
1. Remove the current witness
Command : Set-ClusterQuorum -NoWitness
2.Update DNS CNAME record
3.Perform the IPconfig flushdns remotely on all cluster nodes using powershell command:
Invoke-Command -ComputerName vm1,vm2,vm3,pune-dc -ScriptBlock {Clear-DnsClientCache}
3.1 Restart the Workstation service
Invoke-Command -ComputerName vm1,vm2,vm3,pune-dc -ScriptBlock { get-service LanmanWorkstation | restart-service -force }
4. Check if all nodes are now resolving correctly to new fileshare server using powershell command:
Invoke-Command -ComputerName vm1,vm2,vm3,pune-dc -ScriptBlock {Test-Connection witness -Count 1}
5. If resolving correct fileserver then configure the Fileshare witness using powershell command:
Set-ClusterQuorum -FileShareWitness \\witness\shared-data\cluster-witness\win-cluster
Hence we have configured /updated the fileshare witness successfully using powershell
Thank You