2010-11-25 46 views
1

我正在開發腳本以支持羣集服務器的自動化管理,作爲其中的一部分,我需要能夠從Powershell腳本中停止和啓動羣集節點。Windows Powershell和管理NLB羣集

我使用這個代碼如下:

Import-Module NetworkLoadBalancingClusters 

Stop-NlbClusterNode [[-HostName] <string>] [-InterfaceName <string>] [<CommonParameters>] 

但在運行在3種不同環境中,此腳本(的Windows 7/Windows Server 2003中/在Windows Server 2008 R2)所有使用PowerShell v2的,我得到以下錯誤:

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. 

有沒有人知道我在這裏做錯了什麼導致此錯誤?

由於事先

斯圖爾特

回答

0

的Windows Server 2008 R2上這僅適用於,你必須安裝網絡負載平衡功能。