Unable to change the application gateway settings via Azure PowerShell
JayaPrakash Naidu C S
5
Reputation points
Hey There!
I'm trying to update the existing app gateway by adding a new backend pool using Azure powershell.
But it is throwing me the below error.
Set-AzApplicationGateway : Data or KeyVaultSecretId must be specified for certificate
'/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/applicationGateways/xxx/trustedRootCertificates/xxx-cert'. If you are providing certificate data,
please upload the certificate again, otherwise please remove the certificate and all references. Subsequent operations will continue to fail with this error message until a valid certificate replaces the existing certificate or the
certificate is removed. For secrets/certificates referenced by key vault, please ensure connectivity to key vault is possible and the referenced secret/certificate has not been disabled.
At line:1 char:1
+ Set-AzApplicationGateway -ApplicationGateway $appgateway
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzApplicationGateway], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.SetAzureApplicationGatewayCommand
The commands used are below
$appgateway=Get-AzApplicationGateway -Name xxxx -ResourceGroupName xxx
Add-AzApplicationGatewayBackendAddressPool -ApplicationGateway $appgateway -Name "Pool02" -BackendFqdns "contoso1.com", " contoso1.com"
Set-AzApplicationGateway -ApplicationGateway $appgateway
If I do the same thing from the portal everything is working fine, just failing via azure powershell.
Kindly Help.
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,213 questions
Windows for business Windows Server User experience PowerShell
Sign in to answer