File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
articles/virtual-machines/windows Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -207,19 +207,15 @@ $VMSS = New-AzVmssConfig -Location $LocationName -SkuCapacity 2 -SkuName $VMSize
207
207
$VMSS = Add-AzVmssNetworkInterfaceConfiguration -Name "myVMSSNetworkConfig" -VirtualMachineScaleSet $VMSS -Primary $true -IpConfiguration $ipConfig
208
208
209
209
$diskEncryptionSet=Get-AzDiskEncryptionSet -ResourceGroupName $ResourceGroupName -Name $diskEncryptionSetName
210
- ```
211
210
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
213
212
214
- ``` PowerShell
215
213
$VMSS = Set-AzVmssStorageProfile $VMSS -OsDiskCreateOption "FromImage" -DiskEncryptionSetId $diskEncryptionSet.Id -ImageReferenceOffer 'WindowsServer' -ImageReferenceSku '2012-R2-Datacenter' -ImageReferenceVersion latest -ImageReferencePublisher 'MicrosoftWindowsServer'
216
214
217
215
$VMSS = Set-AzVmssOsProfile $VMSS -ComputerNamePrefix $ComputerNamePrefix -AdminUsername $VMLocalAdminUser -AdminPassword $VMLocalAdminSecurePassword
218
- ```
219
216
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
221
218
222
- ``` PowerShell
223
219
$VMSS = Add-AzVmssDataDisk -VirtualMachineScaleSet $VMSS -CreateOption Empty -Lun 1 -DiskSizeGB 128 -StorageAccountType Premium_LRS -DiskEncryptionSetId $diskEncryptionSet.Id
224
220
225
221
$Credential = New-Object System.Management.Automation.PSCredential ($VMLocalAdminUser, $VMLocalAdminSecurePassword);
You can’t perform that action at this time.
0 commit comments