Skip to content

Instantly share code, notes, and snippets.

@Merlus
Created November 15, 2017 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Merlus/6bd9f55b3c7f92e2815b3aca1dfa75b5 to your computer and use it in GitHub Desktop.
Save Merlus/6bd9f55b3c7f92e2815b3aca1dfa75b5 to your computer and use it in GitHub Desktop.
ASG - Assign NSG
$vnet = Get-AzureRmVirtualNetwork -Name asgtest -ResourceGroupName asgtest
Set-AzureRmVirtualNetworkSubnetConfig -Name default -VirtualNetwork $vnet -NetworkSecurityGroupId $nsg.Id -AddressPrefix '10.1.0.0/24'
Set-AzureRmVirtualNetwork -VirtualNetwork $vnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment