From 47380f651ae5893ebc28fdf7b46012994acfb20d Mon Sep 17 00:00:00 2001 From: Sriram H Iyer <205528661+hisriram1996@users.noreply.github.com> Date: Fri, 11 Apr 2025 20:04:49 +0530 Subject: [PATCH] Update Add-AzApplicationGatewaySslCertificate.md The command "Get-AzKeyVaultCertificate" results the Key Vault secret reference ID to be invalid. The correct command to be used is "Get-AzKeyVaultSecret". This has been verified in lab environment. --- .../Network/help/Add-AzApplicationGatewaySslCertificate.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Network/Network/help/Add-AzApplicationGatewaySslCertificate.md b/src/Network/Network/help/Add-AzApplicationGatewaySslCertificate.md index 5887362e3cc6..ad126ee58fff 100644 --- a/src/Network/Network/help/Add-AzApplicationGatewaySslCertificate.md +++ b/src/Network/Network/help/Add-AzApplicationGatewaySslCertificate.md @@ -36,7 +36,7 @@ This command gets an application gateway named ApplicationGateway01 and then add ### Example 2: Add an SSL certificate using KeyVault Secret (version-less secretId) to an application gateway. ```powershell $AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01" -$secret = Get-AzKeyVaultCertificate -VaultName "keyvault01" -Name "sslCert01" +$secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01" $secretId = $secret.Id.Replace($secret.Version, "") # https://.vault.azure.net/secrets/ $AppGW = Add-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert01" -KeyVaultSecretId $secretId ``` @@ -47,7 +47,7 @@ Note: As version-less secretId is provided here, Application Gateway will sync t ### Example 3: Add an SSL certificate using KeyVault Secret (versioned secretId) to an application gateway. ```powershell $AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01" -$secret = Get-AzKeyVaultCertificate -VaultName "keyvault01" -Name "sslCert01" +$secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01" $secretId = $secret.Id # https://.vault.azure.net/secrets/ $AppGW = Add-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert01" -KeyVaultSecretId $secretId ```