$ PASSWORD=$(openssl rand -base64 32)
sirothiyashalini@Azure:~$ az vm create \
--resource-group learn-df90a5df-3520-422f-b7ae-eb2b371c2d78 \
--name myVM \
--image win2019datacenter \
--admin-username $USERNAME \
--admin-password $PASSWORD
It is recommended to use parameter "--public-ip-sku Standard" to create new VM with Standard public IP. Please note that the default public IP used for VM creation will be changed from Basic to Standard in the future.
{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Pleasesee https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"'VMCustomization' is not enabled for the Subscription. Please register the Subscription for 'Microsoft.Compute/VMCustomizationPreview' to use the feature.\"\r\n }\r\n}"}]}}