I have NLB installed and set up. I get the interface data like so:
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 :
I would like to use Powershell to set NlbBound to true. Needless to say setting the property doesn't work. e.g
$x = Get-NlbClusterNodeNetworkInterface
$x[1].nlbbound = $true
$x = Get-NlbClusterNodeNetworkInterface
echo $x[1].NlbBound
False
I want to avoid having to explicitly set the property in the Network adaptor settings because this functionality will live in a script. I'd also like to avoid using WMI if possible.
According to the Get-Member cmdlet the NlbBound property is 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;}**