I am in the process of developing scripts to allow automated management of Clustered servers, and as part of that I have a requirement to be able to stop and start cluster nodes from a Powershell script.
The code I am using for this is as follows:
Import-Module NetworkLoadBalancingClusters
Stop-NlbClusterNode [[-HostName] <string>] [-InterfaceName <string>] [<CommonParameters>]
But on running this script on 3 different environments (Windows 7/Windows Server 2003/Windows Server 2008 R2) all with Powershell v2, I get the following error:
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 + FullyQualifi开发者_开发问答edErrorId : System.Management.ManagementException,Microsoft.NetworkLoadBalancingClusters.PowerShell.GetNlbCluster.
Does anyone know what I have done wrong here which is causing this error?
Thanks In Advance,
Stuart
This only works on Windows Server 2008 R2 and you have to install the Network Load Balancing feature.
精彩评论