Set-NlbClusterPortRule
Edits the port rules for a Network Load Balancing (NLB) cluster.
Set-NlbClusterPortRule
[-HostName <String>]
[-InterfaceName <String>]
[-IP <IPAddress>]
[[-Port] <UInt32>]
[-NewIP <IPAddress>]
[-NewProtocol <PortRuleProtocol>]
[-NewStartPort <Int32>]
[-NewEndPort <Int32>]
[-NewMode <PortRuleFilteringMode>]
[-NewAffinity <PortRuleAffinity>]
[-NewTimeout <UInt32>]
[<CommonParameters>]
Set-NlbClusterPortRule
-InputObject <PortRule[]>
[-NewIP <IPAddress>]
[-NewProtocol <PortRuleProtocol>]
[-NewStartPort <Int32>]
[-NewEndPort <Int32>]
[-NewMode <PortRuleFilteringMode>]
[-NewAffinity <PortRuleAffinity>]
[-NewTimeout <UInt32>]
[<CommonParameters>]
The Set-NlbClusterPortRule cmdlet edits the port rules for a Network Load Balancing (NLB) cluster. The port rule configuration you can edit includes the cluster IP address, port range, protocols, filtering mode, affinity, load weight, handling priority, and timeout.
This operation changes the configuration on all cluster nodes. As a result, the NLB cluster will have to restart the convergence process on all nodes to guarantee that configuration changes have been applied on all nodes and that a consistent state is reached. Any additional operations on the NLB cluster should not be initiated until all cluster nodes have completed the convergence process and are back to the converged state.
ps_nlbc_checkstate_remark
PS C:\>Get-NlbClusterPortRule -Port 80 | Set-NlbClusterPortRule -NewStartPort 5
IPAddress State Start End Protocol Mode Affinity Timeout
--------- ----- ----- --- -------- ---- -------- -------
All Enabled 5 65535 Both Multiple Single 0
This example changes the start port of the port rule of port number 80 to 5.
PS C:\>Get-NlbClusterPortRule -Port 80 | Set-NlbClusterPortRule -NewProtocol Tcp
IPAddress State Start End Protocol Mode Affinity Timeout
--------- ----- ----- --- -------- ---- -------- -------
All Enabled 5 65535 Tcp Multiple Single 0
This command changes the protocol of the port rule of port number 80 to TCP.
PS C:\>Get-NlbClusterPortRule 80 | Set-NlbClusterPortRule -NewMode Single
IPAddress State Start End Protocol Mode Affinity Timeout
--------- ----- ----- --- -------- ---- -------- -------
All Enabled 5 65535 Tcp Single 0
This example changes the port rule mode to Single.
Specifies the name of the cluster host against which this cmdlet is run.
If this parameter is omitted or a value of .
is entered, then the local cluster is assumed.
Type: | String |
Aliases: | Host, HN, H |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the cluster port rule to set.
Type: | PortRule[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the interface to which NLB is bound. This is the interface of the cluster against which this cmdlet is run.
Type: | String |
Aliases: | Interface, IN, I |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the IP address for the cluster port rule to set.
Type: | IPAddress |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the new affinity for the cluster port rule. The acceptable values for this parameter are:Network, None, and Single.
Type: | PortRuleAffinity |
Aliases: | NA |
Accepted values: | None, Single, Network |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the new end port for the cluster port rule.
The acceptable values for this parameter are:0
through 65535
.
Type: | Int32 |
Aliases: | NEP |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the new IP address for the cluster port rule.
Type: | IPAddress |
Aliases: | NIP |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a new mode for the cluster port rule. The acceptable values for this parameter are:Disabled, Multiple hosts, and Single host.
Type: | PortRuleFilteringMode |
Aliases: | NM |
Accepted values: | Single, Multiple, Disabled |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the new protocol for the cluster port rule. The acceptable values for this parameter are:Both, Tcp, and Udp.
Type: | PortRuleProtocol |
Aliases: | NPRTCL |
Accepted values: | Tcp, Udp, Both |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the new start port for the cluster port rule.
The acceptable values for this parameter are:0
through 65535
.
Type: | Int32 |
Aliases: | NSP |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the new timeout in minutes for the cluster port rule.
The acceptable values for this parameter are:0
through 240
.
Type: | UInt32 |
Aliases: | Timeout, T |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a port number within the port rule to set.
The acceptable values for this parameter are:0
through 65535
.
Type: | UInt32 |
Aliases: | P |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule
Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule