Skip to content

Commit 6968a7a

Browse files
committed
Updates
1 parent 3eb5381 commit 6968a7a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

articles/virtual-machines/windows/disk-encryption.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,19 +207,15 @@ $VMSS = New-AzVmssConfig -Location $LocationName -SkuCapacity 2 -SkuName $VMSize
207207
$VMSS = Add-AzVmssNetworkInterfaceConfiguration -Name "myVMSSNetworkConfig" -VirtualMachineScaleSet $VMSS -Primary $true -IpConfiguration $ipConfig
208208
209209
$diskEncryptionSet=Get-AzDiskEncryptionSet -ResourceGroupName $ResourceGroupName -Name $diskEncryptionSetName
210-
```
211210
212-
##### Enable encryption at rest with customer managed keys for OS disk by setting DiskEncryptionSetId property
211+
# Enable encryption at rest with customer managed keys for OS disk by setting DiskEncryptionSetId property
213212
214-
```PowerShell
215213
$VMSS = Set-AzVmssStorageProfile $VMSS -OsDiskCreateOption "FromImage" -DiskEncryptionSetId $diskEncryptionSet.Id -ImageReferenceOffer 'WindowsServer' -ImageReferenceSku '2012-R2-Datacenter' -ImageReferenceVersion latest -ImageReferencePublisher 'MicrosoftWindowsServer'
216214
217215
$VMSS = Set-AzVmssOsProfile $VMSS -ComputerNamePrefix $ComputerNamePrefix -AdminUsername $VMLocalAdminUser -AdminPassword $VMLocalAdminSecurePassword
218-
```
219216
220-
##### Add a data disk encrypted at rest with customer managed keys by setting DiskEncryptionSetId property
217+
# Add a data disk encrypted at rest with customer managed keys by setting DiskEncryptionSetId property
221218
222-
```PowerShell
223219
$VMSS = Add-AzVmssDataDisk -VirtualMachineScaleSet $VMSS -CreateOption Empty -Lun 1 -DiskSizeGB 128 -StorageAccountType Premium_LRS -DiskEncryptionSetId $diskEncryptionSet.Id
224220
225221
$Credential = New-Object System.Management.Automation.PSCredential ($VMLocalAdminUser, $VMLocalAdminSecurePassword);

0 commit comments

Comments
 (0)