$cred=Get-Credential# Create the initial configuration$vm=New-AzVMConfig-VMNamemyVM-VMSizeStandard_Ds1_v2# Set the operating system$vm=Set-AzVMOperatingSystem`-VM$vm`-Windows`-ComputerNamemyVM`-Credential$cred`-ProvisionVMAgent-EnableAutoUpdate# Set the image information$vm=Set-AzVMSourceImage`-VM$vm`-PublisherNameMicrosoftWindowsServer`-OfferWindowsServer`-Skus2016-Datacenter`-Versionlatest# Create the VMNew-AzVM-ResourceGroupNamemyResourceGroupVM-LocationEastUS-VM$vm