我正在开发脚本以允许自动管理集群服务器,作为其中的一部分,我需要能够从 Powershell 脚本停止和启动集群节点。
我为此使用的代码如下:
Import-Module NetworkLoadBalancingClusters
Stop-NlbClusterNode [[-HostName] <string>] [-InterfaceName <string>] [<CommonParameters>]
但是在使用 Powershell v2 的 3 个不同环境(Windows 7/Windows Server 2003/Windows Server 2008 R2)上运行此脚本时,我收到以下错误:
Get-NlbCluster : This method is not implemented in any class At line:6 char:15 + Get-NlbCluster <<<< -HostName "SERVER1" -InterfaceName "10.172.1.180" + CategoryInfo : NotSpecified: (:) [Get-NlbCluster], ManagementException + FullyQualifiedErrorId : System.Management.ManagementException,Microsoft.NetworkLoadBalancingClusters.PowerShell.GetNlbCluster.
有谁知道我在这里做错了什么导致了这个错误?
提前致谢,
斯图尔特