14.1 Deploy VM

Task 1: Deploy an Azure virtual machine

  1. Sign-in to the Azure portal https://portal.azure.com/.

    Note: Sign in to the Azure portal using an account that has the Owner or Contributor role in the Azure subscription you are using for this lab.

  2. Open the Cloud Shell by clicking the first icon in the top right of the Azure Portal. If prompted, select PowerShell and Create storage.

  3. Ensure PowerShell is selected in the drop-down menu in the upper-left corner of the Cloud Shell pane.

  4. In the PowerShell session within the Cloud Shell pane, run the following to create a resource group that will be used in this lab:

    New-AzResourceGroup -Name AZ500LAB131415 -Location 'EastUS'
    

    Note: This resource group will be used for labs 13, 14, and 15.

  5. In the PowerShell session within the Cloud Shell pane, run the following to create a new Azure virtual machine.

    New-AzVm -ResourceGroupName "AZ500LAB131415" -Name "myVM" -Location 'EastUS' -VirtualNetworkName "myVnet" -SubnetName "mySubnet" -SecurityGroupName   "myNetworkSecurityGroup" -PublicIpAddressName "myPublicIpAddress" -OpenPorts 80,3389
    
  6. When prompted for credentials:

    Setting Value
    User name localadmin
    Password Pa55w.rd1234

    Note: Wait for the deployment to complete.

  7. In the PowerShell session within the Cloud Shell pane, run the following to confirm that the virtual machine named myVM was created and its ProvisioningState is Succeeded.

    Get-AzVM -Name 'myVM' -ResourceGroupName 'AZ500LAB131415' | Format-Table
    
  8. Close the Cloud Shell pane.