Skip to content

Commit 339a3f3

Browse files
authored
Merge pull request #79190 from msmbaldwin/ade-cli-win-qs
Ade cli win qs
2 parents 326ed5c + f4e31ee commit 339a3f3

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

articles/security/azure-disk-encryption-linux-cli-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Create a VM with [az vm create](/cli/azure/vm?view=azure-cli-latest#az-vm-create
3434
az vm create \
3535
--resource-group myResourceGroup \
3636
--name myVM \
37-
--image Canonical:UbuntuServer:16.04-LTS:latest
37+
--image Canonical:UbuntuServer:16.04-LTS:latest \
3838
--size Standard_D2S_V3 \
3939
```
4040

articles/security/azure-disk-encryption-linux-powershell-quickstart.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,19 @@ The Azure PowerShell module is used to create and manage Azure resources from th
1414

1515
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
1616

17-
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
18-
1917
## Create a resource group
2018

2119
Create an Azure resource group with [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup). A resource group is a logical container into which Azure resources are deployed and managed:
2220

23-
```azurepowershell-interactive
21+
```powershell
2422
New-AzResourceGroup -Name "myResourceGroup" -Location "EastUS"
2523
```
2624

2725
## Create a virtual machine
2826

2927
Create an Azure virtual machine with [New-AzVM](/powershell/module/az.compute/new-azvm), passing to it the VM configuration object you created above.
3028

31-
```azurecli-interactive
29+
```powershell
3230
$securePassword = ConvertTo-SecureString 'AZUREuserPA$$W0RD' -AsPlainText -Force
3331
$cred = New-Object System.Management.Automation.PSCredential ("azureuser", $securePassword)
3432
@@ -37,14 +35,14 @@ New-AzVM -Name MyVm -Credential $cred -ResourceGroupName MyResourceGroup -Image
3735

3836
It will take a few minutes for your VM to be deployed.
3937

40-
## Create a Key Vault
38+
## Create a Key Vault configured for encryption keys
4139

4240
Azure disk encryption stores its encryption key in an Azure Key Vault. Create a Key Vault with [New-AzKeyvault](/powershell/module/az.keyvault/new-azkeyvault). To enable the Key Vault to store encryption keys, use the -EnabledForDiskEncryption parameter.
4341

4442
> [!Important]
4543
> Each Key Vault must have a unique name. The following example creates a Key Vault named *myKV*, but you must name yours something different.
4644
47-
```azurecli-interactive
45+
```powershell
4846
New-AzKeyvault -name MyKV -ResourceGroupName myResourceGroup -Location EastUS -EnabledForDiskEncryption
4947
```
5048

@@ -54,7 +52,7 @@ Encrypt your VM with [Set-AzVmDiskEncryptionExtension](/powershell/module/az.com
5452

5553
Set-AzVmDiskEncryptionExtension requires some values from your Key Vault object. You can obtain these values by passing the unique name of your key vault to [Get-AzKeyvault](/powershell/module/az.keyvault/get-azkeyvault).
5654

57-
```azurecli-interactive
55+
```powershell
5856
$KeyVault = Get-AzKeyVault -VaultName MyKV -ResourceGroupName MyResourceGroup
5957
6058
Set-AzVMDiskEncryptionExtension -ResourceGroupName MyResourceGroup -VMName MyVM -DiskEncryptionKeyVaultUrl $KeyVault.VaultUri -DiskEncryptionKeyVaultId $KeyVault.ResourceId -SkipVmBackup -VolumeType All
@@ -70,7 +68,7 @@ RequestId IsSuccessStatusCode StatusCode ReasonPhrase
7068

7169
You can verify the encryption process by running [Get-AzVmDiskEncryptionStatus](/powershell/module/az.compute/Get-AzVMDiskEncryptionStatus).
7270

73-
```azurecli-interactive
71+
```powershell
7472
Get-AzVmDiskEncryptionStatus -VMName MyVM -ResourceGroupName MyResourceGroup
7573
```
7674

@@ -87,7 +85,7 @@ ProgressMessage : OS disk encryption started
8785

8886
When no longer needed, you can use the [Remove-AzResourceGroup](/powershell/module/az.resources/remove-azresourcegroup) cmdlet to remove the resource group, VM, and all related resources:
8987

90-
```azurepowershell-interactive
88+
```powershell
9189
Remove-AzResourceGroup -Name "myResourceGroup"
9290
```
9391

articles/security/azure-disk-encryption-windows-powershell-quickstart.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,35 @@ The Azure PowerShell module is used to create and manage Azure resources from th
1414

1515
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
1616

17-
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
1817

1918
## Create a resource group
2019

2120
Create an Azure resource group with [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup). A resource group is a logical container into which Azure resources are deployed and managed:
2221

23-
```azurepowershell-interactive
22+
```powershell
2423
New-AzResourceGroup -Name "myResourceGroup" -Location "EastUS"
2524
```
2625

2726
## Create a virtual machine
2827

2928
Create an Azure virtual machine with [New-AzVM](/powershell/module/az.compute/new-azvm). You must supply credentials to the cmdlet.
3029

31-
```azurepowershell-interactive
32-
$securePassword = ConvertTo-SecureString 'AZUREuserPA$$W0RD' -AsPlainText -Force
33-
$cred = New-Object System.Management.Automation.PSCredential ("azureuser", $securePassword)
30+
```powershell
31+
$cred = Get-Credential
3432
35-
New-AzVM -Name MyWinVm -Credential $cred -ResourceGroupName MyResourceGroup -Image win2016datacenter -Size Standard_D2S_V3
33+
New-AzVM -Name MyVm -Credential $cred -ResourceGroupName MyResourceGroup -Image win2016datacenter -Size Standard_D2S_V3
3634
```
3735

3836
It will take a few minutes for your VM to be deployed.
3937

40-
## Create a Key Vault
38+
## Create a Key Vault configured for encryption keys
4139

4240
Azure disk encryption stores its encryption key in an Azure Key Vault. Create a Key Vault with [New-AzKeyvault](/powershell/module/az.keyvault/new-azkeyvault). To enable the Key Vault to store encryption keys, use the -EnabledForDiskEncryption parameter.
4341

4442
> [!Important]
4543
> Each Key Vault must have a unique name. The following example creates a Key Vault named *myKV*, but you must name yours something different.
4644
47-
```azurecli-interactive
45+
```powershell
4846
New-AzKeyvault -name MyKV -ResourceGroupName myResourceGroup -Location EastUS -EnabledForDiskEncryption
4947
```
5048

@@ -54,7 +52,7 @@ Encrypt your VM with [Set-AzVmDiskEncryptionExtension](/powershell/module/az.com
5452

5553
Set-AzVmDiskEncryptionExtension requires some values from your Key Vault object. You can obtain these values by passing the unique name of your key vault to [Get-AzKeyvault](/powershell/module/az.keyvault/get-azkeyvault).
5654

57-
```azurecli-interactive
55+
```powershell
5856
$KeyVault = Get-AzKeyVault -VaultName MyKV -ResourceGroupName MyResourceGroup
5957
6058
Set-AzVMDiskEncryptionExtension -ResourceGroupName MyResourceGroup -VMName MyVM -DiskEncryptionKeyVaultUrl $KeyVault.VaultUri -DiskEncryptionKeyVaultId $KeyVault.ResourceId
@@ -70,7 +68,7 @@ RequestId IsSuccessStatusCode StatusCode ReasonPhrase
7068

7169
You can verify the encryption process by running [Get-AzVmDiskEncryptionStatus](/powershell/module/az.compute/Get-AzVMDiskEncryptionStatus).
7270

73-
```azurecli-interactive
71+
```powershell
7472
Get-AzVmDiskEncryptionStatus -VMName MyVM -ResourceGroupName MyResourceGroup
7573
```
7674

@@ -87,7 +85,7 @@ ProgressMessage : Provisioning succeeded
8785

8886
When no longer needed, you can use the [Remove-AzResourceGroup](/powershell/module/az.resources/remove-azresourcegroup) cmdlet to remove the resource group, VM, and all related resources:
8987

90-
```azurepowershell-interactive
88+
```powershell
9189
Remove-AzResourceGroup -Name "myResourceGroup"
9290
```
9391

0 commit comments

Comments
 (0)