次の方法で共有


Set-SCPortACLRule

Set-SCPortACLRule

Sets the port ACL rule parameters.

Syntax

Parameter Set: Default
Set-SCPortACLRule [-PortACLRule] <PortACLRule> [[-Description] <String> ] [-Action <PortACLRuleAction> ] [-DestinationAddressPrefix <String> ] [-DestinationPortRange <String> ] [-JobVariable <String> ] [-Logging <Boolean> ] [-Name <String> ] [-OnBehalfOfUser <String> ] [-OnBehalfOfUserRole <UserRole> ] [-Priority <UInt16> ] [-PROTipID <Guid> ] [-Protocol <PortACLRuleProtocol> ] [-RunAsynchronously] [-SourceAddressPrefix <String> ] [-SourcePortRange <String> ] [-Type <PortACLRuleDirection> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

The Set-SCPortACLRule cmdlet sets the port Access Control List (ACL) rule parameters on a Virtual Machine Manager (VMM) Server.

Parameters

-Action<PortACLRuleAction>

Specifies the rule action of the port ACL.

The acceptable values for this parameter are:

-- Allow
-- Deny

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

Specifies the description of the port ACL rule.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DestinationAddressPrefix<String>

Specifies the destination address prefix for the port ACL rule.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DestinationPortRange<String>

Specifies the destination port range for the port ACL rule.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Logging<Boolean>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the port ACL rule.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUser<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUserRole<UserRole>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PortACLRule<PortACLRule>

Specifies the port ACL rule value.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByValue)

Accept Wildcard Characters?

false

-Priority<UInt16>

Specifies the priority of the port ACL rule. This value of this parameter must be between 1 and 65535. The lowest number has the highest priority.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Protocol<PortACLRuleProtocol>

Specifies the protocol for which this cmdlet applies to the port ACL rule.

The acceptable values for this parameter are:

-- TCP
-- UDP
-- Any

Aliases

none

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourceAddressPrefix<String>

Specifies the source address prefix of the port ACL rule.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourcePortRange<String>

Specifies the source port range for the port ACL rule.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Type<PortACLRuleDirection>

Specifies the direction where the ACL gets applied.

The acceptable values for this parameter are:

-- Inbound
-- Outbound

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies the Virtual Machine Manager (VMM) Server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Set parameters for an existing port ACL rule

The first command gets the port ACL named SampleRule and stores it in the variable named $Acl. The second command sets the rule named AllowSMBOut for the port ACL, sets the protocol to TCP, and sets the action to Allow.

PS C:\> $Acl = Get-SCPortAcl -Name "SampleRule"
PS C:\> Set-SCPortACLRule -Name "AllowSMBOut" -Description "Allow outbound TCP Port 445" -Type Outbound -Protocol TCP -Action Allow -PortACL $Acl -DestinationPortRange 445 -Priority 10

Get-SCPortACLRule

New-SCPortACLRule

Remove-SCPortACLRule

Get-SCUserRole