1
我有NLB安装和设置。我得到的接口数据是这样的:绑定NLB到接口
Get-NlbClusterNodeNetworkInterface
InterfaceName : quanet
NlbBound : False
Cluster :
DhcpEnabled : False
InterfaceIP : 10.165.250.206
InterfaceSubnetMask : 255.255.0.0
ClusterPrimaryIP :
ClusterSubnetMask :
InterfaceName : cluster
NlbBound : False
Cluster :
DhcpEnabled : False
InterfaceIP : 172.16.1.206
InterfaceSubnetMask : 255.255.255.0
ClusterPrimaryIP :
ClusterSubnetMask :
我想使用Powershell将NlbBound设置为true。不用说设置属性不起作用。例如
$x = Get-NlbClusterNodeNetworkInterface
$x[1].nlbbound = $true
$x = Get-NlbClusterNodeNetworkInterface
echo $x[1].NlbBound
False
我想避免必须明确地设置网络适配器设置中的属性,因为此功能将存在于脚本中。 我也想尽量避免使用WMI。
根据给Get-Member cmdlet中NlbBound属性是setible:
Get-Member -InputObject $x[1]
TypeName: Microsoft.NetworkLoadBalancingClusters.PowerShell.NetworkInterface
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Cluster Property System.String Cluster {get;set;}
ClusterPrimaryIP Property System.String ClusterPrimaryIP {get;set;}
ClusterSubnetMask Property System.String ClusterSubnetMask {get;set;}
DhcpEnabled Property System.Boolean DhcpEnabled {get;set;}
InterfaceIP Property System.String InterfaceIP {get;set;}
InterfaceName Property System.String InterfaceName {get;set;}
InterfaceSubnetMask Property System.String InterfaceSubnetMask {get;set;}
NlbBound Property **System.Boolean NlbBound {get;set;}**
见我的答案在这里它应该让你对你的方式: [加入现有的NLB群集] [ 1] [1]:http://stackoverflow.com/questions/10435376/joining-an-existing-nlb-cluster/10734854#10734854 –
优秀。如果您将您的评论重写为答案,我会将其标记为已接受,这样您会获得更多布尔点。非常感谢。 –