Set-AzNetworkSecurityRuleConfig is not useful,it 's a bug?

Dio Wang 21 Reputation points
2021-07-21T06:20:17.317+00:00

when I use the follow command,the web portal is not take effect,Refresh also useless!

PS C:\>$nsg = Get-AzNetworkSecurityGroup -Name "NSG-FrontEnd" -ResourceGroupName "TestRG"
PS C:\> $nsg | Get-AzNetworkSecurityRuleConfig -Name "rdp-rule"
PS C:\> Set-AzNetworkSecurityRuleConfig -Name "rdp-rule" -NetworkSecurityGroup $nsg -Access "Deny"

116641-%E6%9C%AA%E5%91%BD%E5%90%8D1626848308.png

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,773 questions
0 comments No comments
{count} votes

Accepted answer
  1. suvasara-MSFT 10,076 Reputation points Moderator
    2021-07-22T09:24:34.81+00:00

    @Dio Wang , I have tested this and reported the PS bug to the respective PS content owners. They will be working on the resolution part as soon as possible. Also, I have tested this on CLI where it got deployed successfully. In case your deployment is code independent then you can use this CLI block for time saving.

     az network nsg rule update -g Networking-AppGateway-Lab --nsg-name AG-VM-nsg -n RDP --access Deny  
    

    Here is the GitHub Issue for tracking the bug report https://github.com/Azure/azure-powershell/issues/15517

    ----------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.