If you love failover clusters like I do.
You will know that vote weights are typically balanced.
However if you absolutely need to change NodeWeight(voting). Here is a script that will help.
Its even color coded for your pleasure.
Import-module FailoverClusters
write-host -foregroundcolor Yellow " ** The Current Cluster Status ** "
Get-ClusterNode | ft name, dynamicweight, nodeweight, state -AutoSize
$cluster=Get-Cluster
$node=Get-ClusterNode -Cluster $cluster
(Get-ClusterNode -Cluster $cluster -Name "Node01").NodeWeight=1
(Get-ClusterNode -Cluster $cluster -Name "Node02").NodeWeight=0
write-host -foregroundcolor Yellow " ** The New Cluster Status ** "
Get-ClusterNode | ft name, dynamicweight, nodeweight, state -AutoSize
write-host -foregroundcolor Yellow " Press Enter to continue . . . "
$HOST.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | OUT-NULL
$HOST.UI.RawUI.Flushinputbuffer()
#Write-Host -ForeGroundColor Yellow " Press Enter to continue . . . "
#End of Script
You must log in to post a comment.