Windows Powershell 和管理 NLB 集群

发布于 2024-10-04 14:16:38 字数 759 浏览 0 评论 0原文

我正在开发脚本以允许自动管理集群服务器,作为其中的一部分,我需要能够从 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 :此方法未在任何类中实现 
 行数:6 字符:15
 + Get-NlbCluster <<<<< -主机名“SERVER1” -接口名“10.172.1.180”
 + 类别信息:未指定:(:) [获取 NlbCluster],管理异常
 + FullQualifiedErrorId:System.Management.ManagementException、Microsoft.NetworkLoadBalancingClusters.PowerShell.GetNlbCluster。

有谁知道我在这里做错了什么导致这个错误?

提前致谢,

斯图尔特

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
 + FullyQualifiedErrorId : 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱情眠于流年 2024-10-11 14:16:38

这仅适用于 Windows Server 2008 R2,并且您必须安装网络负载平衡功能。

This only works on Windows Server 2008 R2 and you have to install the Network Load Balancing feature.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文