这有效:
Output "Cluster Group: ""$($Group.Name)"", Current Owner: $($Group.OwnerNode), Current State: $($Group.State)"
这不起作用:
Output "Cluster Group: ""$($Group.Name)"", Current Owner: $($Group.OwnerNode.ToUpper()), Current State: $($Group.State)"
有这样的错误:
Method invocation failed because [Microsoft.FailoverClusters.PowerShell.ClusterNode] doesn't contain a method named 'ToUpper'.
关于如何将其从 Get-ClusterGroup 字符串的输出转换为大写的任何想法?