I created a generic service group (or role as it is displayed in the GUI) via powershell
Add-ClusterGenericServiceRole
Basically it is the AppReadiness service. Everything went fine so far.
I would like to change some properties of this group, NOT of the underlying service.
I can get all the properties of the group via Get-Clustergroup -Name .... | select-object *
I see the properties which I would like to change,
FailoverPeriod : 1
FailoverThreshold : 99
These properties are also visible in the GUI on the failover tab When I try
$cluGroup = Get-ClusterGroup -Name ......
and create
$param1 = New-Object -ComObject Microsoft.FailoverClusters.PowerShell.ClusterParameter -Property $cluGroup,FailoverThreshold,55
it gives me the error:
New-Object : Cannot convert 'System.Object[]' to the type 'System.Collections.IDictionary' required by parameter 'Property'. Specified method is not supported.
The error is the same if I change it to Microsoft.FailoverClusters.PowerShell.ClusterResource
In the MS docu they have an example like that also they modify a cluster resource but according to the docu the scriplet takes also Microsoft.FailoverClusters.PowerShell.ClusterGroup
as an input.
The error is still the same if Get-ClusterResource ....
and change it to
$param1 = New-Object -ComObject Microsoft.FailoverClusters.PowerShell.ClusterResource -Property $cluResource,Description,"Some text"
Any help is appreciated
I opened a ticket at Microsoft and they came back with the following working answer:
(Get-ClusterGroup -Name "Testgroup").FailoverPeriod=12
Basically, these "things" which are part of the cluster group are considered "properties" and not parameters and can therefore not be modified with the
Set-ClusterParameter
scriptlet.
All credits to Microsoft