Alternatively, we can create an NSG using Azure PowerShell. The advantage of this approach is that we can add NSG rules in a single script, creating custom rules right after the NSG is created. This allows us to automate the deployment process and have our own "default" rules right after the NSG has been created.
Creating a new NSG with PowerShell
Getting ready
Open the PowerShell console and make sure you are connected to your Azure subscription.
How to do it...
To deploy a new NSG, execute the following command:
New-AzureRmNetworkSecurityGroup -Name "...