Go to your Azure Portal dashboard and click on the Cloud Shell icon. A coding environment will pop up below your screen. Select PowerShell and proceed to create your resource group and virtual machine.
Creating a resource group in powershell just requires this command;
New-AzResourceGroup -Name "ugopowershell" -Location "East US"
Creating a virtual machine in powershell requires this command;
New-AzVm `
-ResourceGroupName "[name of your choice]" `
-Name "[virtual machine name of your choice]" `
-Location "[location of choice]" `
-VirtualNetworkName "myVnetPS" `
-SubnetName "mySubnetPS" `
-SecurityGroupName "myNSGPS" `
-PublicIpAddressName "myPublicIpPS"
Top comments (0)