Disable-NlbClusterPortRule
Disable-NlbClusterPortRule
Disables a port rule on an NLB cluster or on a specific host in the cluster.
Syntax
Disable-NlbClusterPortRule [-Port] <System.Nullable`1[[System.UInt32> [-ClusterWide] [-HostName <string>] [-InterfaceName <string>] [-Ip <IPAddress>] [-Drain] [-Timeout <System.Nullable`1[[System.UInt32>] [<CommonParameters>]
Disable-NlbClusterPortRule -InputObject <PortRule[]> [-Drain] [-Timeout <System.Nullable`1[[System.UInt32>] [<CommonParameters>]
Detailed Description
The Disable-NlbClusterPortRule cmdlet disables a specific port rule on an NLB cluster or on a specific host in the NLB cluster. You should consider disabling new traffic handling for the port rule using the -drain optional parameter. Specifying the -drain parameter at the cluster level drains the specified ports on all hosts within the cluster, and specifying it at the host level drains the ports on the specific host only.
Parameters
-ClusterWide <SwitchParameter>
Disables the given port rule on all cluster nodes. If this parameter is omitted, the port rule is only disabled on one node.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-Drain <SwitchParameter>
Drains existing traffic before disabling this port rule. If this parameter is omitted, existing traffic will be dropped.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-HostName <string>
Specifies the name of the cluster host against which this cmdlet is run. If this parameter is omitted or if "-HostName ." is used, the local cluster is assumed. [Alias: hn]
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-InputObject <PortRule[]>
Specifies the cluster port rule to disable.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
true (ByValue, ByPropertyName) |
Position? |
named |
-InterfaceName <string>
Specifies the interface to which NLB is bound. This is the interface of the cluster against which this cmdlet is run.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-Ip <IPAddress>
Specifies the IP address for the cluster port rule that will be disabled.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-Port <System.Nullable`1[[System.UInt32>
Specifies a port number within the port rule that will be disabled. The valid range is between 0 and 65535.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
-Timeout <System.Nullable`1[[System.UInt32>
Specifies the number of minutes to wait for the drain operation before the port rule is disabled. After the timeout expires, existing connections will be dropped.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-CommonParameter
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.
Input and Return Types
The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.
Examples
EXAMPLE 1
C:\PS>
Disable-NlbClusterPortRule -Port 80
IPAddress State Start End Protocol Mode Affinity Timeout
--------- ----- ----- --- -------- ---- -------- -------
All Disabled 80 80 Both Multiple Single 0
Description
-----------
This command disables port rule 80 on the local cluster.
EXAMPLE 2
C:\PS>
Get-NlbClusterPortRule | Disable-NlbClusterPortRule
IPAddress State Start End Protocol Mode Affinity Timeout
--------- ----- ----- --- -------- ---- -------- -------
All Disabled 80 80 Both Multiple Single 0
Description
-----------
This command disables all port rules on the local cluster.
See Also
Reference
Add-NlbClusterPortRule
Enable-NlbClusterPortRule
Get-NlbClusterPortRule
Remove-NlbClusterPortRule
Set-NlbClusterPortRule