Configuring access to Azure resources by assigning roles

If a user in your organization needs permissions to access Azure resources, you need to assign the user to the appropriate role in Azure. In this section, we are going to assign administrator access to a user for a VM. First, we need to run a script in Azure Cloud Shell to create the VM. Let's get started:

  1. Navigate to the Azure portal by opening https://portal.azure.com/.
  2. Open Azure Cloud Shell.
  1. First, we need to create a new resource group:
az group create --location eastus --name PacktVMResourceGroup
  1. Then, we need to create the VM:
az vm create \    --resource-group PacktVMResourceGroup \    --name VM1 \    --image win2016datacenter \    --admin-username packtuser \ --admin-password PacktPassword123 ...

Get Microsoft Azure Architect Technologies: Exam Guide AZ-300 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.