Export (0) Print
Expand All

Set-NlbClusterPortRule

Updated: August 15, 2012

Applies To: Windows Server 2012

Set-NlbClusterPortRule

Edits the port rules for a Network Load Balancing (NLB) cluster.

Syntax

Parameter Set: NonPipeline
Set-NlbClusterPortRule [[-Port] <Nullable> ] [-HostName <String> ] [-InterfaceName <String> ] [-IP <IPAddress> ] [-NewAffinity <Nullable> ] [-NewEndPort <Nullable> ] [-NewIP <IPAddress> ] [-NewMode <Nullable> ] [-NewProtocol <Nullable> ] [-NewStartPort <Nullable> ] [-NewTimeout <Nullable> ] [ <CommonParameters>]

Parameter Set: Pipeline
Set-NlbClusterPortRule -InputObject <PortRule> [-NewAffinity <Nullable> ] [-NewEndPort <Nullable> ] [-NewIP <IPAddress> ] [-NewMode <Nullable> ] [-NewProtocol <Nullable> ] [-NewStartPort <Nullable> ] [-NewTimeout <Nullable> ] [ <CommonParameters>]




Detailed Description

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.

To check the state of all cluster nodes, use the Get-NlbClusterNode cmdlet. If a configuration change results in the cluster nodes remaining in perpetual convergence, refer to the event log to resolve the configuration inconsistency between the cluster nodes.

Parameters

-HostName<String>

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.


Aliases

hn

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IP<IPAddress>

Specifies the IP address for the cluster port rule to set.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InputObject<PortRule>

Specifies the cluster port rule to set.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-InterfaceName<String>

Specifies the interface to which NLB is bound. This is the interface of the cluster against which this cmdlet is run.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewAffinity<Nullable>

Specifies the new affinity for the cluster port rule. The acceptable values for this parameter are: Network, None, and Single.


Aliases

na

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewEndPort<Nullable>

Specifies the new end port for the cluster port rule. The acceptable values for this parameter are: 0 through 65535.


Aliases

nep

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewIP<IPAddress>

Specifies the new IP address for the cluster port rule.


Aliases

nip

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewMode<Nullable>

Specifies a new mode for the cluster port rule. The acceptable values for this parameter are: Disabled, Multiple hosts, and Single host.


Aliases

nm

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewProtocol<Nullable>

Specifies the new protocol for the cluster port rule. The acceptable values for this parameter are: Both, Tcp, and Udp.


Aliases

nprtcl

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewStartPort<Nullable>

Specifies the new start port for the cluster port rule. The acceptable values for this parameter are: 0 through 65535.


Aliases

nsp

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewTimeout<Nullable>

Specifies the new timeout in minutes for the cluster port rule. The acceptable values for this parameter are: 0 through 240.


Aliases

t

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Port<Nullable>

Specifies a port number within the port rule to set. The acceptable values for this parameter are: 0 through 65535.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule

Examples

EXAMPLE 1

This example changes the start port of the port rule of port number 80 to 5.


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 

EXAMPLE 2

This command changes the protocol of the port rule of port number 80 to TCP.


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 

EXAMPLE 3

This example changes the port rule mode to Single.


PS C:\> Get-NlbClusterPortRule 80 | Set-NlbClusterPortRule -NewMode Single
IPAddress State     Start     End       Protocol  Mode      Affinity  Timeout 
--------- -----     -----     ---       --------  ----      --------  ------- 
All       Enabled   5         65535     Tcp       Single              0 

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft