2
votes

I'm trying to create a VM in Azure via Powershell as part of preparation for taking the AZ-300 exam next month. I am running powershell 7.0.3 and the Azure Powershell module. This is a Visual Studio Azure subscription - on which I've created VMs in the past, but not via the Powershell module I'm running this from a Win10 machine and getting the error: New-AzVM: The property 'securityProfile.encryptionAtHost' is not valid because the 'Microsoft.Compute/EncryptionAtHost' feature is not enabled for this subscription.

I'm not attempting to set Encryption at host, and according to the documentation on this cmdlet, the 'EncryptionatHost' flag is set to false by default.

New-AzVM -ResourceGroupName 'az-300-mw-test-pwsh' -name 'az-300-pwsh' -Location 'UKSouth' -VirtualNetworkName 'az-300-pwsh' -SubnetName 'default' -SecurityGroupName 'az-300-pwsh' -PublicIpAddressName 'az-300-pwsh' -OpenPorts 3389 
1
Could you please add a link to the documentation? As well as formatting of the errors as code snippets would be helpful.Eugene Mamaev

1 Answers

1
votes

Looks like it was a problem on Azure side that will be resolved soon with the release of Az 4.6.1 and Az.Compute 4.3.1 as stated on a related GitHub issue: https://github.com/Azure/azure-powershell/issues/12776