From 7ceacb0774abaff0c25db8768a63e864aed3757c Mon Sep 17 00:00:00 2001 From: Stefan Ivemo Date: Thu, 16 Apr 2020 16:29:36 +0200 Subject: [PATCH] Wrong cmdlet used to get the certifacte The example is using Get-AzKeyVaultSecret to get the certificate from Key Vault, Get-AzKeyVaultCertificate is the correct cmdlet to use. --- .../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 fb19ff84dc0a..c032cff20866 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. ``` PS C:\> $AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01" -PS C:\> $secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01" +PS C:\> $secret = Get-AzKeyVaultCertificate -VaultName "keyvault01" -Name "sslCert01" PS C:\> $secretId = $secret.Id.Replace($secret.Version, "") # https://.vault.azure.net/secrets/ PS C:\> $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. ``` PS C:\> $AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01" -PS C:\> $secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01" +PS C:\> $secret = Get-AzKeyVaultCertificate -VaultName "keyvault01" -Name "sslCert01" PS C:\> $secretId = $secret.Id # https://.vault.azure.net/secrets/ PS C:\> $AppGW = Add-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert01" -KeyVaultSecretId $secretId ```