Skip to content

Instantly share code, notes, and snippets.

@Merlus
Created November 15, 2017 02:14
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/569647ab1f9e2ed11c7376d05b458f32 to your computer and use it in GitHub Desktop.
Save Merlus/569647ab1f9e2ed11c7376d05b458f32 to your computer and use it in GitHub Desktop.
ASG - Add NIC to ASG
$webNic = Get-AzureRmNetworkInterface -Name web134 -ResourceGroupName asgtest
$webNic.IpConfigurations[0].ApplicationSecurityGroups = $webAsg
Set-AzureRmNetworkInterface -NetworkInterface $webNic
$sqlNic = Get-AzureRmNetworkInterface -Name sql1333 -ResourceGroupName asgtest
$sqlNic.IpConfigurations[0].ApplicationSecurityGroups = $sqlAsg
Set-AzureRmNetworkInterface -NetworkInterface $sqlNic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment