Hi,
Did you set values for your variables ($ResourceGroup, $VMName, $Location) before trying to run New-AzVM? Below is a sample script to create VM in Australia Central:
$ResourceGroup = "my-resource-group-rg"
$VMName = "Mlb-VM01"
$Location = "australiacentral"
$cred = New-Object System.Management.Automation.PSCredential ("azureuser", (ConvertTo-SecureString "P@assw0rd!" -AsPlainText -Force))
New-AzVM -ResourceGroupName $ResourceGroup -Name $VMName -Location $Location -VirtualNetworkName "az104vmpsVnet" -SubnetName "az104vmpsSubnet" -SecurityGroupName "az104vmpsNetworkSecurityGroup" -PublicIpAddressName "az104vmpsPublicIpAddress" -OpenPorts 3389 -Size "Standard_B2s" -Credential $cred
The above will create the VM with Premium SSD for the OS disk. I recommend deleting the resource group immediately after you are done testing/learning for the day to minimize ongoing costs.
Please click Accept Answer if the above was helpful.
Thanks.
-TP