Question :
I have been trying to get the parameter value for RegisterAllProvidersIP in my AG environment. However, the command is not fetching me all results. The resultset has just 4 parameters, and I’m wondering how to get all. I want to check this to investigate the ongoing connectivity issue. This is a multi-subnet AlwaysOn configuration.
I am using the below command:
Get-Clusterresource -Name AG_Name | Get-ClusterParameter
AG_Name being the listener name.
Please help in identifying what I am doing wrong or is it just some permission issue?
Answer :
The command you are running is returning all of the parameters for an availability group resource. There are not many, as most of the config is stored in SQL Server and not as cluster resource parameters.
The RegisterAllProvidersIP parameter is not a parameter of the availability group resource. RegisterAllProvidersIP is a parameter of network name resources. You can see all of the RegisterAllProvidersIP settings on all network name resources on the cluster with the following command:
Get-ClusterResource | where-object {$_.ResourceType.name -eq "Network Name"} |
Get-ClusterParameter RegisterAllProvidersIP
I use the following command on my new cluster builds to disable RegisterAllProvidersIP on all cluster network name resources except for the Cluster Name resource:
Get-ClusterResource | where-object {$_.ResourceType.name -eq "Network Name"} |
where-object {$_.name -ne "Cluster Name"} |
set-ClusterParameter RegisterAllProvidersIP 0
Please keep in mind that this command changes that setting on all cluster name resources except for the Cluster Name resource, so if you have other applications set up on the cluster you may not want to use this.