Edit

Share via


Enable-NlbClusterPortRule

Enables a port rule on a NLB cluster or on a specific node in the cluster.

Syntax

NonPipeline (Default)

Enable-NlbClusterPortRule
    [-Port] <UInt32>
    [-ClusterWide]
    [-HostName <String>]
    [-InterfaceName <String>]
    [-IP <IPAddress>]
    [<CommonParameters>]

Pipeline

Enable-NlbClusterPortRule
    -InputObject <PortRule[]>
    [<CommonParameters>]

Description

The Enable-NlbClusterPortRule cmdlet enables a specific port rule on a Network Load Balancing (NLB) cluster or on a specific node in the NLB cluster.

Examples

Example 1: Enable a port rule on the local cluster

PS C:\>Enable-NlbClusterPortRule -Port 80
IPAddress State     Start     End       Protocol  Mode      Affinity  Timeout
--------- -----     -----     ---       --------  ----      --------  -------
All       Enabled   80        80        Both      Multiple  Single    0

This command enables port rule 80 on the local cluster.

Example 2: Enable all port rules on the local cluster

PS C:\>Get-NlbClusterPortRule | Enable-NlbClusterPortRule
IPAddress State     Start     End       Protocol  Mode      Affinity  Timeout
--------- -----     -----     ---       --------  ----      --------  -------
All       Enabled   80        80        Both      Multiple  Single    0

This command enables all port rules on the local cluster.

Parameters

-ClusterWide

Enables the given port rule on all cluster nodes. If this parameter is omitted, then the port rule is only enabled on one node.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Cluster, C

Parameter sets

NonPipeline
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HostName

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Host, HN, H

Parameter sets

NonPipeline
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specifies an array of cluster port rules that this cmdlet enables.

Parameter properties

Type:

PortRule[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Pipeline
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-InterfaceName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Interface, IN, I

Parameter sets

NonPipeline
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IP

Specifies the IP address for the cluster port rule that this cmdlet enables.

Parameter properties

Type:IPAddress
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NonPipeline
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Port

Specifies a port number within the port rule that is enabled. The acceptable values for this parameter are: 0 through 65535.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:P

Parameter sets

NonPipeline
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule

Outputs

Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule