How to create a VM in PowerShell?
# Define a credential object $cred = Get-Credential # Create a virtual machine configuration $vmConfig = New-AzureRmVMConfig -VMName myVM -VMSize Standard_DS2 | ` Set-AzureRmVMOperatingSystem -Windows -ComputerName myVM -Credential $cred | ` Set-AzureRmVMSourceImage -PublisherName MicrosoftWindowsServer -Offer WindowsServer ` -Skus 2016-Datacenter -Version latest | Add-AzureRmVMNetworkInterface -Id $nic.Id To create a virtual machine (VM) in Microsoft Azure … Read more