Set-NlbClusterPortRule
Set-NlbClusterPortRule
Edits the port rules for a Network Load Balancing (NLB) cluster.
Sintaxis
Parameter Set: NonPipeline
Set-NlbClusterPortRule [[-Port] <UInt32> ] [-HostName <String> ] [-InterfaceName <String> ] [-IP <IPAddress> ] [-NewAffinity <PortRuleAffinity> {Network | None | Single} ] [-NewEndPort <Int32> ] [-NewIP <IPAddress> ] [-NewMode <PortRuleFilteringMode> {Disabled | Multiple | Single} ] [-NewProtocol <PortRuleProtocol> {Both | Tcp | Udp} ] [-NewStartPort <Int32> ] [-NewTimeout <UInt32> ] [ <CommonParameters>]
Parameter Set: Pipeline
Set-NlbClusterPortRule -InputObject <PortRule[]> [-NewAffinity <PortRuleAffinity> {Network | None | Single} ] [-NewEndPort <Int32> ] [-NewIP <IPAddress> ] [-NewMode <PortRuleFilteringMode> {Disabled | Multiple | Single} ] [-NewProtocol <PortRuleProtocol> {Both | Tcp | Udp} ] [-NewStartPort <Int32> ] [-NewTimeout <UInt32> ] [ <CommonParameters>]
Descripción detallada
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.
Parámetros
-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.
Alias |
Host,HN,H |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-IP<IPAddress>
Specifies the IP address for the cluster port rule to set.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-InputObject<PortRule[]>
Specifies the cluster port rule to set.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-InterfaceName<String>
Specifies the interface to which NLB is bound. This is the interface of the cluster against which this cmdlet is run.
Alias |
Interface,IN,I |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-NewAffinity<PortRuleAffinity>
Specifies the new affinity for the cluster port rule. Los valores aceptables para este parámetro son los siguientes: Network, None, and Single.
Alias |
NA |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-NewEndPort<Int32>
Specifies the new end port for the cluster port rule. Los valores aceptables para este parámetro son los siguientes: 0
through 65535
.
Alias |
NEP |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-NewIP<IPAddress>
Specifies the new IP address for the cluster port rule.
Alias |
NIP |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-NewMode<PortRuleFilteringMode>
Specifies a new mode for the cluster port rule. Los valores aceptables para este parámetro son los siguientes: Disabled, Multiple hosts, and Single host.
Alias |
NM |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-NewProtocol<PortRuleProtocol>
Specifies the new protocol for the cluster port rule. Los valores aceptables para este parámetro son los siguientes: Both, Tcp, and Udp.
Alias |
NPRTCL |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-NewStartPort<Int32>
Specifies the new start port for the cluster port rule. Los valores aceptables para este parámetro son los siguientes: 0
through 65535
.
Alias |
NSP |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-NewTimeout<UInt32>
Specifies the new timeout in minutes for the cluster port rule. Los valores aceptables para este parámetro son los siguientes: 0
through 240
.
Alias |
Timeout,T |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Port<UInt32>
Specifies a port number within the port rule to set. Los valores aceptables para este parámetro son los siguientes: 0
through 65535
.
Alias |
P |
¿Requerido? |
false |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
- Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
- Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule
Ejemplos
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
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
EXAMPLE 3
This example changes the port rule mode to Single.
PS C:\> Get-NlbClusterPortRule 80 | Set-NlbClusterPortRule -NewMode Single