Basic Usage of Azure Services

Create your Azure Environment

Create a Resource group

  • Basically the resource group will manage all other resources that you create and let us manage our environment and infrastructure

  1. In search bar, look for: Research Group

  1. Select the create button and enter the necessary details

  1. Once create, it will be listed in the resource group section

Create a virtual machine (Windows Server 2019)

  1. After creating a resource group we can proceed to creating a virtual machine

  2. Type Virtual machine in the search bar or look for in on the side bar

  1. Select Create > Add virtual machine

  1. You can see that if ask for the resource group, you can simply add the one that you created previously

  • Username: AZadministrator

  • Password: Password@12345

  1. Go to Next to the Disk page, Keep everything as default

  2. Go to the Networking Page: Keep everything Default

  3. Go default settings for all the following pages, until review and create

  4. Once you press create it will take some time to deploy the VM

  1. You will get a notification once it is completed

Creating a Group with Cloud Shell/Bash

  1. Open up the CLI using the key in the top right of the screen

  2. You can switch between Bash and PowerShell

Creating a Resource Group Command

az group create --name Windows-Vms --location eastus
  1. If we go back to the resource groups tab, we will see that if has created this group

Creating a VM using Bash

Use the following command to create a virtual machine using CLI

az vm create --resource-group Windows-VMs --name WIN-SN01 --image win2018datacenter --admin-username azuser --admin-password P@ssword1234
  • It will run first and output json format once complete of the details of the VM as per below

  1. If we go back to the Virtual Machines Tab, we will see the newly created VM

Connecting to a VM

  1. To connect to the VM

  2. Go to the virtual machine and select Connect

  1. Click on connect and select "Download RDP"

  1. Click on the RDP File and enter the username and password that you create for that Virtual Machine

  2. Accept all prompts and you will be connected to the VM

Reset password for VM

  1. Click on the Virtual Machine

  2. On the left hand side, search for "Reset Password"

  1. Enter the username and the new password that you want

Azure AD; Reset user password

  1. Open Microsoft Entra ID

  1. Click on the User Tab as per above image

  2. Here you will see a list of all users of your Entra ID Tenant

  1. Click on a user and select the "Reset Password" option at the top


Cloud Shell commands

Open the shell

List Resource List

az resource list 

List Resource in Table Format

az resource list --output table 

List Azure VMs

az vm list --out tsv 

List Azure VMs in Table Format

az vm list --out table 

Azure Shell Interactive Mode

  1. In the cloud CLI, use the following command to initiate cloud shell interactive

az interactive 

Delete Resource group

Delete using GUI

  1. Go to the resource group tab

  2. Click on the resource group and copy its name

  3. Enter the name and press delete

Delete using CLI

  1. Open CLI

  2. Find the resource group name you want to delete, make sure you remember it correctly

  3. Use the following command

az group delete --name Windows-VMs

Cost Management; Create budget

  1. Go to Cost Management

  1. Go to Budget (search for it if you cannot find it)

  • The goal is to create a budget so that you do not overspend on the Virtual Machines

  1. Click Add

  1. Give it a name and the monthly amount

  1. You can create some alerts on the next tab

  • Add the alerts and email addresses and press create

Security Center

Last updated