Created
September 26, 2015 02:02
-
-
Save jalex19100/ca928bf48036d8758b4d to your computer and use it in GitHub Desktop.
Modify Azure VM ACL with Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$name = "myVM" | |
$acl1 = New-AzureAclConfig | |
$vm = Get-AzureVM -ServiceName $name -Name $name | |
Set-AzureAclConfig -AddRule -ACL $acl1 -Order 100 -Action permit -RemoteSubnet "X.X.0.0/16" -Description "rule1" | |
Set-AzureAclConfig -AddRule -ACL $acl1 -Order 200 -Action permit -RemoteSubnet "X.X.0.0/16" -Description "rule2" | |
$vm | Get-AzureEndpoint | ForEach-Object {Set-AzureEndpoint -ACL $acl1 -Nam | |
e $_.Name -VM $vm} | |
Update-AzureVM -ServiceName $name -Name $name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment