Quantcast
Channel: Azure Networking (DNS, Traffic Manager, VPN, VNET) forum
Viewing all articles
Browse latest Browse all 6513

Issue while associating Inbound Rules to new created NSG

$
0
0

I am following the below URL to create NSGs using Powershell

https://docs.microsoft.com/en-in/azure/virtual-network/virtual-networks-create-nsg-arm-ps

I created the two rules $rule1 and $rule2 but the new NSG NSGFrontEnd1 gets created only with default rules when i run $NSG command.

The Inbound RDP and Web rule do not get associated with the NSGFrontEnd1.

When i try to associate these two rules with a new NSG "NSGFrontEnd1", by running the command

$nsg = New-AzureRmNetworkSecurityGroup -ResourceGroupName pallabrg
 -Name "NSGFrontEnd1" -SecurityRules $rule1,$rule2

i get the below error message.

********************************************************************************************************

-Name : The term '-Name' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify 

that the path is correct and try again.

At line:2 char:2

+  -Name "NSGFrontEnd1" -SecurityRules $rule1,$rule2

+  ~~~~~

    + CategoryInfo          : ObjectNotFound: (-Name:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException


Pallab Chakraborty


Viewing all articles
Browse latest Browse all 6513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>