I need to disable some rules configured under network security groups with RDP and SSH port open. I am facing some issues with removing the rule configuration :
This is the command I execute :
Get-AzureRmNetworkSecurityGroup -Name $securityGroupName -ResourceGroupName $resourceGroupName | Remove-AzureRmNetworkSecurityRuleConfig -Name $enabledSecurityRDPRule.Name
However when I check the portal or execute the get cmdlet I don't see the earlier command took effect.
I even tried with Set-AzureRmNetworkSecurityRuleConfig to set the access to deny and got the same result.
The service principal that I use to access my environment has contributor privileges.