I have an existing app gateway has 4 path based rule setup. I need to add new entry in app gateway through powershell, I have used following commands but after running it removes all existing entries and adds only new rule (overrides all 4 rules and add only new entry):
$appgw = Set-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $appgw -Name "pathBasedRule" -PathRules $myPathRule -DefaultBackendAddressPool $backendPool -DefaultBackendHttpSettings $backendPoolSetting
Set-AzApplicationGateway -ApplicationGateway $appgw
I couldn't find any power shell command where I can fetch all 4 rules then I will add 1 new rule, so that
my app gateway will have 5 rules after running. how can I do that through PS?