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 –
優秀。如果您將您的評論重寫爲答案,我會將其標記爲已接受,這樣您會獲得更多布爾點。非常感謝。 –