Set-SCPortACLRule

Modifies a port ACL rule.

Syntax

Set-SCPortACLRule [-PortACLRule] <PortACLRule> [[-Description] <String>] [-Action <PortACLRuleAction>]
 [-JobVariable <String>] [-LocalAddressPrefix <String>] [-LocalPortRange <String>] [-Name <String>]
 [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-Priority <UInt16>]
 [-Protocol <PortACLRuleProtocol>] [-RemoteAddressPrefix <String>] [-RemotePortRange <String>]
 [-RunAsynchronously] [-Type <PortACLRuleDirection>] [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

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

Examples

Example 1: Modify the port ACL rule priority

PS C:\> $PortACLRule = Get-SCPortACLRule -Name "AllowRDPAccess"
PS: C:\> Set-SCPortACLRule -PortACLRule $PortACLRule -Priority 220"

The first command gets the port ACL rule named AllowRDPAccess, and then stores it in the $PortACLRule variable.

The second command changes the priority of the rule in $PortACLRule to 220.

Example 2: Modify the port acl rule remote address range and protocol

PS C:\> $PortACLRule = Get-SCPortACLRule -Name "AllowRDPAccess"
PS: C:\> Set-SCPortACLRule -PortACLRule $portACLRule -RemoteAddressPrefix 172.185.21.0/24 -Protocol Udp

The first command gets the port ACL rule named AllowRDPAccess, and then stores it in the $PortACLRule variable.

The second command changes the protocol of the ACL rule in $PortACLRule to UDP and sets the remote address range to a different subnet.

Parameters

-Action

Specifies a port ACL rule action object.

Type:PortACLRuleAction
Parameter Sets:Allow, Deny
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the port ACL rule.

Type:String
Required:False
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LocalAddressPrefix

Specifies the local address prefix.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LocalPortRange

Specifies the local port range.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of the port ACL rule.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUser

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PortACLRule

Specifies the port ACL rule to modify.

Type:PortACLRule
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Priority

Specifies the priority.

Type:UInt16
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Protocol

Specifies the protocol. The acceptable values for this parameter are:

- Tcp

  • Udp
  • Any

Type:PortACLRuleProtocol
Parameter Sets:Tcp, Udp, Any
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoteAddressPrefix

Specifies the remote address prefix.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemotePortRange

Specifies the remote port range.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

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

Specifies the type. The acceptable values for this parameter are:

- Inbound

  • Outbound

Type:PortACLRuleDirection
Parameter Sets:Inbound, Outbound
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False