https://docs.microsoft.com/en-us/powershell/module/failoverclusters/set-clusterparameter?view=windowsserver2016-ps
Microsoft (and others) have good documentation on this but it's not working for me. I am trying to set the IP address parameters. The issue is that the IP address is not part of the allowable object types to modify.
For example this fails (from MS docs)
PS C:\> Get-ClusterResource -Name "Cluster IP Address" | Set-ClusterParameter -Multiple @{"Address"="172.24.22.168";"Network"="Cluster Network 2";"EnableDhcp"=1}
The IP address of the cluster is "Cluster IP Address". I can see it. GetType() is PSObject. But when I run teh Set-ClusterParameter command the error is:
Set-ClusterParameter: The input object cannot be bound to any
parameters for the command either because the command does not take
pipeline input or the input and its properties do not match any of the
parameters that take pipeline input.
If I try to use the object.
PS C:\Users\rdejournett> Set-ClusterParameter -InputObject
$SqlIpAddress Set-ClusterParameter: Cannot bind parameter
'InputObject' to the target. Exception setting "InputObject": "Invalid
object in the pipeline. This cmdlet only accepts objects of the
following types:
Microsoft.FailoverClusters.PowerShell.Cluster,Microsoft.FailoverClusters.PowerShell.ClusterGroup,Microsoft.FailoverClusters.PowerShell.ClusterResource,Microsoft.FailoverClusters.PowerShell.ClusterResourceType,Microsoft.FailoverClusters.PowerShell.ClusterNetwork,Microsoft.FailoverClusters.PowerShell.ClusterNetworkInterface,Microsoft.FailoverClusters.PowerShell.ClusterNode,Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume,Microsoft.FailoverClusters.PowerShell.ClusterParameter"
(The object is being set like this)
$SqlIpAddress = Get-ClusterResource | Where-Object {$_.Name.StartsWith("Cluster IP Address")}
It appears that the IP address resource is not a type of resource that can be set, despite the documentation (or I am doing something wrong...)