
Create a new Resource Group with a name and location, then do a get-credential to use a the logon details to the vm, and then do a New-AzureRmVm passing in 8 parameters.
So the points to note for Creating a VM in Azure from PowerShell are the following key points:-
Create a VM using PowerShell (know the order) 8 parameters****
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-manage-vm
- New-AzureRmResourceGroup -ResourceGroupName “GregorExams” -Location “WestEurope”
- $cred = Get-Credential (this is where you supply the username and password for logging into the VM once its created)
- New-AzureRmVm -ResourceGroupName “GregorExams” -Name “GregVM1” -Location “WestEurope” -VirtualNetworkName “myVnet” -SubnetName “mySubnet” -SecurityGroupName “myNetWorkSecurityGroup” -PublicIpAddressName “myPublicIPAddress” -Credential $cred



