新建集群:无法将'IP'转换为参数'StaticAddress'所需的'System.Collections.Specialized.StringCollection'类型



我正在使用PowerShell脚本创建集群

New-Cluster -Name $Clustername -Node $Hostname -StaticAddress $ClusterIP

但当它执行命令时,它会给出以下错误

新建群集:无法将"192.168.155.196"转换为参数"StaticAddress"所需的类型"System.Collections.Specialized.StringCollection"。无法将"System.Net.IPAddress"类型的对象强制转换为"System.String"类型的

错误显示$ClusterIP[System.Net.IPAddress]对象。使用其ToString()方法:

New-Cluster -Name $Clustername -Node $Hostname -StaticAddress $ClusterIP.ToString()

相关内容

最新更新