Created
June 30, 2021 22:26
-
-
Save SvenAelterman/104ce1f8934814c2e4882ab40b40f1ed to your computer and use it in GitHub Desktop.
Sets the cluster probe port for Windows Server Failover Cluster (WSFC) in Azure using a load balancer (traditional VNN, not needed for DNN). This is an enhancement to the script at https://docs.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/availability-group-listener-powershell-configure#configure-the-listener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module FailoverClusters | |
[int]$ClusterProbePort = 58888 # The probe port from the WSFCEndPointprobe in the Azure portal. This port must be different from the probe port for the availability group listener probe port. | |
# Retrieve info from the cluster | |
$ClusterNetworkName = (Get-ClusterNetwork).Name | |
$IPResource = (Get-ClusterResource | Where {($_.OwnerGroup -eq "Cluster Group" -And $_.ResourceType -eq "IP Address")}) | |
$IPResourceName = $IPResource.Name | |
$ClusterCoreIP = ($IPResource | Get-ClusterParameter | Where { $_.Name -eq "Address" }).Value | |
Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{"Address"="$ClusterCoreIP";"ProbePort"=$ClusterProbePort;"SubnetMask"="255.255.255.255";"Network"="$ClusterNetworkName";"EnableDhcp"=0} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment