How To Manage Azure Network Security Groups With PowerShell

Security in the public cloud is very important, don’t overlook this when deploying resources and also don’t assume that the cloud provider will supply all the protection required.

In this Snip, Nick will guide you through the critical process of creating a Network Security Group (NSG) in Azure using New-AzureRmNetworkSecurityGroup and adding Security rules using New-AzureRmNetworkSecurityRuleConfig and retrieving those rules using Get-AzureRmNetworkSecurityRuleConfig. Security rules in network security groups enable you to filter the type of network traffic that can flow in and out of virtual network subnets and network interfaces. Nick will also show you how to modify the rules using Set-AzureRmSecurityRuleConfig and removing the rules using remove-AzureRmSecurityRuleConfig. The final steps will show you how to adjust the properties of the NSG using Set-AzureRmNetworkSecurityGroup and remove an NSG with Remove-AzureRmNetworkSecurityGroup.

Prerequisites include:

Azure Account Azure Powershell Module Azure Resource Group and a virtual Network with one subnet

Recommended Snips:
How To Manage Azure Virtual Networks With PowerShell How To Manage Azure Resource Groups With PowerShell