Skip to content

Commit 20c1663

Browse files
authored
Merge pull request #79529 from cynthn/patch-270
Update tutorial-secure-web-server.md
2 parents e934244 + 8534446 commit 20c1663

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/virtual-machines/windows/tutorial-secure-web-server.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Tutorial - Secure a Windows web server with SSL certificates in Azure | Microsoft Docs
33
description: In this tutorial, you learn how to use Azure PowerShell to secure a Windows virtual machine that runs the IIS web server with SSL certificates stored in Azure Key Vault.
44
services: virtual-machines-windows
@@ -55,7 +55,7 @@ $location = "East US"
5555
New-AzResourceGroup -ResourceGroupName $resourceGroup -Location $location
5656
```
5757

58-
Next, create a Key Vault with [New-​Azure​Rm​Key​Vault](https://docs.microsoft.com/powershell/module/az.keyvault/new-azkeyvault). Each Key Vault requires a unique name, and should be all lower case. Replace `mykeyvault` in the following example with your own unique Key Vault name:
58+
Next, create a Key Vault with [New-AzKeyVault](https://docs.microsoft.com/powershell/module/az.keyvault/new-azkeyvault). Each Key Vault requires a unique name, and should be all lower case. Replace `mykeyvault` in the following example with your own unique Key Vault name:
5959

6060
```azurepowershell-interactive
6161
$keyvaultName="mykeyvault"
@@ -66,16 +66,16 @@ New-AzKeyVault -VaultName $keyvaultName `
6666
```
6767

6868
## Generate a certificate and store in Key Vault
69-
For production use, you should import a valid certificate signed by trusted provider with [Import-​Azure​Key​Vault​Certificate](https://docs.microsoft.com/powershell/module/az.keyvault/import-azkeyvaultcertificate). For this tutorial, the following example shows how you can generate a self-signed certificate with [Add-AzureKeyVaultCertificate](https://docs.microsoft.com/powershell/module/az.keyvault/add-azkeyvaultcertificate) that uses the default certificate policy from [New-AzureKeyVaultCertificatePolicy](https://docs.microsoft.com/powershell/module/az.keyvault/new-azkeyvaultcertificatepolicy).
69+
For production use, you should import a valid certificate signed by trusted provider with [Import-AzKeyVaultCertificate](https://docs.microsoft.com/powershell/module/az.keyvault/import-azkeyvaultcertificate). For this tutorial, the following example shows how you can generate a self-signed certificate with [Add-AzKeyVaultCertificate](https://docs.microsoft.com/powershell/module/az.keyvault/add-azkeyvaultcertificate) that uses the default certificate policy from [New-AzKeyVaultCertificatePolicy](https://docs.microsoft.com/powershell/module/az.keyvault/new-azkeyvaultcertificatepolicy).
7070

7171
```azurepowershell-interactive
72-
$policy = New-AzureKeyVaultCertificatePolicy `
72+
$policy = New-AzKeyVaultCertificatePolicy `
7373
-SubjectName "CN=www.contoso.com" `
7474
-SecretContentType "application/x-pkcs12" `
7575
-IssuerName Self `
7676
-ValidityInMonths 12
7777
78-
Add-AzureKeyVaultCertificate `
78+
Add-AzKeyVaultCertificate `
7979
-VaultName $keyvaultName `
8080
-Name "mycert" `
8181
-CertificatePolicy $policy
@@ -119,10 +119,10 @@ It takes a few minutes for the VM to be created. The last step uses the Azure Cu
119119

120120

121121
## Add a certificate to VM from Key Vault
122-
To add the certificate from Key Vault to a VM, obtain the ID of your certificate with [Get-AzureKeyVaultSecret](https://docs.microsoft.com/powershell/module/az.keyvault/get-azkeyvaultsecret). Add the certificate to the VM with [Add-AzVMSecret](https://docs.microsoft.com/powershell/module/az.compute/add-azvmsecret):
122+
To add the certificate from Key Vault to a VM, obtain the ID of your certificate with [Get-AzKeyVaultSecret](https://docs.microsoft.com/powershell/module/az.keyvault/get-azkeyvaultsecret). Add the certificate to the VM with [Add-AzVMSecret](https://docs.microsoft.com/powershell/module/az.compute/add-azvmsecret):
123123

124124
```azurepowershell-interactive
125-
$certURL=(Get-AzureKeyVaultSecret -VaultName $keyvaultName -Name "mycert").id
125+
$certURL=(Get-AzKeyVaultSecret -VaultName $keyvaultName -Name "mycert").id
126126
127127
$vm=Get-AzVM -ResourceGroupName $resourceGroup -Name "myVM"
128128
$vaultId=(Get-AzKeyVault -ResourceGroupName $resourceGroup -VaultName $keyVaultName).ResourceId

0 commit comments

Comments
 (0)