Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-AzureAclConfig

Set-AzureAclConfig

microsoft.windowsazure.commands.servicemanagement.dll

Synopsis

Sets the ACL configuration object on an existing Azure VM configuration.

Syntax

Set-AzureAclConfig [-AddRule] [-Action] [-RemoteSubnet] [-Order] [-Description] [-ACL] [<CommonParameters>]

Set-AzureAclConfig [-RemoveRule] [-RuleId] [-ACL] [<CommonParameters>]

Set-AzureAclConfig [-SetRule] [-RuleId] [-Action] [-RemoteSubnet] [-Order] [-Description] [-ACL] [<CommonParameters>]

Detailed Description

The Set-AzureAclConfig cmdlet sets the ACL configuration object from an existing Azure VM configuration.

Parameters

-AddRule <SwitchParameter>

Indicates that a rule should be added.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Action <String>

Specifies this rules action. Must be either Permit or Deny.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-RemoteSubnet <String>

Specifies the remote subnet for this rule. Must be a valid CIDR Address.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Order <Int32>

Specifies the processing order for this rule.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Description <String>

A description for this rule.

Aliases

None

Required?

false

Position

3

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ACL <NetworkAclObject>

The ACL configuration object to add this rule to.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-RemoveRule <SwitchParameter>

Indicates that a rule should be removed.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-RuleId <Int32>

Specifies the rule ID to remove from the given ACL configuration.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-SetRule <SwitchParameter>

Indicates that a rule should be changed.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- Example 1 --------------------------

This command will create a new ACL configuration and add a new rule to the configuration.

PS C:\> C:\PS> $acl = New-AzureAclConfig
C:\PS> Set-AzureAclConfig -AddRule -ACL $acl Permit 172.0.0.0/8 100 "Rule Description"

-------------------------- Example 2 --------------------------

This command will get the ACL Configuration of the endpoint "Web" on "MyVM" and set the Order of the first ACL rule to 102, and change it's description, then update the VM.

PS C:\> C:\PS> $acl = Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Get-AzureAclConfig -EndpointName "Web"
C:\PS> Set-AzureAclConfig –SetRule -ID 0 -ACL $acl -Order 102 -Description "New Description"
C:\PS> Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Set-AzureEndpoint -ACL $acl -Name "Web"  | Update-AzureVM

-------------------------- Example 3 --------------------------

This command will get the ACL Configuration of the endpoint "Web" on "MyVM" and remove the first ACL rule, then update the VM.

PS C:\> C:\PS> $acl = Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Get-AzureAclConfig -EndpointName "Web"
C:\PS> Set-AzureAclConfig –RemoveRule -ID 0 -ACL $acl
C:\PS> Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Set-AzureEndpoint -ACL $acl -Name "Web"  | Update-AzureVM

New-AzureAclConfig
Remove-AzureAclConfig
Get-AzureAclConfig