Skip to content

Commit f4e31ee

Browse files
committed
Updated code blocks
1 parent 5aa1248 commit f4e31ee

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

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

Lines changed: 6 additions & 8 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-powershell.md](../../../includes/cloud-shell-powershell.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
@@ -44,7 +42,7 @@ Azure disk encryption stores its encryption key in an Azure Key Vault. Create a
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: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,20 @@ 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-powershell.md](../../../includes/cloud-shell-powershell.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
30+
```powershell
3231
$cred = Get-Credential
3332
3433
New-AzVM -Name MyVm -Credential $cred -ResourceGroupName MyResourceGroup -Image win2016datacenter -Size Standard_D2S_V3
@@ -43,7 +42,7 @@ Azure disk encryption stores its encryption key in an Azure Key Vault. Create a
4342
> [!Important]
4443
> Each Key Vault must have a unique name. The following example creates a Key Vault named *myKV*, but you must name yours something different.
4544
46-
```azurecli-interactive
45+
```powershell
4746
New-AzKeyvault -name MyKV -ResourceGroupName myResourceGroup -Location EastUS -EnabledForDiskEncryption
4847
```
4948

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

5453
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).
5554

56-
```azurecli-interactive
55+
```powershell
5756
$KeyVault = Get-AzKeyVault -VaultName MyKV -ResourceGroupName MyResourceGroup
5857
5958
Set-AzVMDiskEncryptionExtension -ResourceGroupName MyResourceGroup -VMName MyVM -DiskEncryptionKeyVaultUrl $KeyVault.VaultUri -DiskEncryptionKeyVaultId $KeyVault.ResourceId
@@ -69,7 +68,7 @@ RequestId IsSuccessStatusCode StatusCode ReasonPhrase
6968

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

72-
```azurecli-interactive
71+
```powershell
7372
Get-AzVmDiskEncryptionStatus -VMName MyVM -ResourceGroupName MyResourceGroup
7473
```
7574

@@ -86,7 +85,7 @@ ProgressMessage : Provisioning succeeded
8685

8786
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:
8887

89-
```azurepowershell-interactive
88+
```powershell
9089
Remove-AzResourceGroup -Name "myResourceGroup"
9190
```
9291

0 commit comments

Comments
 (0)