Reputation: 607
I have an Azure loadbalancer v2 created and wish to remove a rule from it. So, I will get a load balancer object:
$loadBalancer = Get-AzureLoadBalancer -Name myLoadbalancer -ResourceGroupName myResourceGroup
Then, I will try to remove a rule:
Remove-AzureLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -Name RuleName
But, the rule stays there... Maybe I am missing something obvious? There is no examples which i can base on :(
Upvotes: 0
Views: 992
Reputation: 131
Cmdlets with “Config” suffix only change in-memory data ($loadBalancer object in this case).
After Remove-AzureLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -Name RuleName
Do Set-AzureLoadBalancer -LoadBalancer $loadBalancer
Let me know
Upvotes: 2
Reputation: 607
As far as I understood - it is not working like this. I was able to reach this goal by using same resource manager template, which is used to provision this resource and modifying it to remove/update required rules
Upvotes: 0