Get-NlbClusterPortRule

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

Syntax

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

Description

The Get-NlbClusterPortRule cmdlet retrieves 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

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

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

EXAMPLE 2

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

This example gets the port rule that includes port 80.

EXAMPLE 3

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

Type:String
Aliases:Host, HN, H
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Specifies the cluster or cluster node for which port rules are enumerated.

Type:PSObject[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-InterfaceName

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

-IP

Specifies the IP address for the cluster port rule that will be retrieved.

Type:IPAddress
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-NodeName

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

Type:String
Aliases:NN
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Port

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

Type:UInt32
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.NetworkLoadBalancingClusters.PowerShell.Cluster

Outputs

Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule