Hopefully this one is easy-
I am scripting a method to update clustered Windows servers in the event of an IP change. I am nearly done, but for display and monitoring purposes, I would like to standardize the name of the "Cluster IP Address" resources. By default the first IP resource is named "Cluster IP Address" and each additional IP is called "Cluster IP Address ". When I update an IP, the name will still have the old IP in the name. I can change this through the Failover Cluster Manager GUI, but I would like to change this using Powershell and it is not documented as a configurable parameter in Microsoft documentation.
This will be on systems running Windows Server 2012 and above. I will have at most two Cluster IP Address resources per deployment. This is used for SQL Availability Groups. I have attempted updating the cluster registry keys tied to the resource name and changing ClusterObject.Name, which is not configurable.
To check the resource names, run the following. In my case there are two- "Cluster IP Address" and "Cluster IP Address (Original 2nd IP)".
Get-ClusterResource
Then update the second Cluster IP Address
Get-ClusterResource -Name "Cluster IP Address <Original 2nd IP>" | Set-ClusterParameter -Multiple @{"Address"="<New 2nd IP>";"Network"="Cluster Network 2"}
After this, the IP will change successfully, but running Get-ClusterResource will still return "Cluster IP Address (Original 2nd IP)" as the name of the second Cluster IP Address resource because we changed the IP and not the name. The name is not a parameter that can be changed with Set-ClusterParameter.
tl;dr: I am looking for a Powershell command to change the name of a Cluster IP Address resource.
Ok, it was actually way more simple than I thought. It isn't a parameter.
(Get-ClusterResource -Name "Cluster IP Address <Original 2nd IP>").Name = "Cluster IP Address <New 2nd IP>"