편집

다음을 통해 공유


Get-NlbClusterPortRule

Gets the port rule objects that are queried by the caller.

Syntax

NonPipeline (Default)

Get-NlbClusterPortRule
    [[-Port] <UInt32>]
    [-HostName <String>]
    [-InterfaceName <String>]
    [-IP <IPAddress>]
    [-NodeName <String>]
    [<CommonParameters>]

Pipeline

Get-NlbClusterPortRule
    [[-Port] <UInt32>]
    -InputObject <PSObject[]>
    [-IP <IPAddress>]
    [<CommonParameters>]

Description

The Get-NlbClusterPortRule cmdlet gets the port rules in the Network Load Balancing (NLB) cluster. If a port number is not specified, all port rules configured for the cluster are listed.

Examples

Example 1: List all port rules on the local cluster

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

This command lists all the port rules on the local cluster.

Example 2: Get a port rule for a specific port

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

This command gets the port rule that includes port 80.

Example 3: Get port rules from all cluster nodes

PS C:\>Get-NlbClusterNode | Get-NlbClusterPortRule | Format-List -Property *
Cluster          : mycluster
NodeName         : node1
VirtualIPAddress : 255.255.255.255
StartPort        : 0
EndPort          : 65535
Affinity         :
FilteringMode    : Single
Protocol         : Both
EqualLoad        : False
LoadWeight       :
PortState        : Enabled
Priority         : 1
Timeout          :

Cluster          : mycluster
NodeName         : node2
VirtualIPAddress : 255.255.255.255
StartPort        : 0
EndPort          : 65535
Affinity         :
FilteringMode    : Single
Protocol         : Both
EqualLoad        : False
LoadWeight       :
PortState        : Enabled
Priority         : 2
Timeout          :

This command gets the port rule from all cluster nodes. This is especially useful if there are port rules that have Single mode.

Parameters

-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 or cluster nodes for which port rules are enumerated.

Parameter properties

Type:

PSObject[]

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 gets.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NodeName

Specifies the name of the cluster node for which port rules are enumerated.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:NN

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 this cmdlet gets. The acceptable values for this parameter are: 0 through 65535.

Parameter properties

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

Parameter sets

(All)
Position:0
Mandatory:False
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.Cluster

Outputs

Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule