Share via


Get-SCPortACLRule

Gets a port ACL rule.

Syntax

All (Default)

Get-SCPortACLRule
    [-VMMServer <ServerConnection>]
    [-Name <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

ById

Get-SCPortACLRule
    [-VMMServer <ServerConnection>]
    [-Name <String>]
    [-ID <Guid>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

ByPortACL

Get-SCPortACLRule
    [-VMMServer <ServerConnection>]
    [-Name <String>]
    [-PortACL <PortACL>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

Description

The Get-SCPortACLRule cmdlet gets a port access control list (ACL) rule in Virtual Machine Manager (VMM).

Examples

Example 1: Get a port ACL rule

PS C:\> Get-SCPortACLRule -Name "AllowRDPAccess"

The command gets the port ACL rule named AllowRDPAccess.

Example 2: Get port ACL rules from an ACL

PS C:\> $PortACL = Get-SCPortACL -Name "RDP ACL"
PS C:\> Get-SCPortACLRule -PortACL $PortACL"

The first command gets the port ACL named RDP ACL, and then stores it in the $PortACL variable.

The second command gets all the rules under the port ACL in $PortACL.

Parameters

-ID

Specifies the numerical identifier as a globally unique identifier, or GUID, for a specific object.

Parameter properties

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

Parameter sets

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

-Name

Specifies the name of the ACL rule.

Parameter properties

Type:String
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

-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Parameter properties

Type:String
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

-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

Parameter properties

Type:UserRole
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

-PortACL

Specifies a port ACL object.

Parameter properties

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

Parameter sets

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

-VMMServer

Specifies a VMM server object.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
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.