- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Installing the Azure Az Module for PowerShell Core
The Az module in PowerShell Core is necessary for managing Azure resources. In this hands-on lab, we will show how to install the Az module and perform some basic commands for managing resources in Azure.

Lab Info
Table of Contents
-
Challenge
Log in to the VM
- Open a new terminal.
- Copy the public IP address, given to you along with this hands-on lab.
- In the terminal, enter
ssh cloud_user@<PUBLIC_IP_OF_THE_VM>
. - Once logged in, enter
pwsh
to start the PowerShell prompt.
-
Challenge
Install the Az PowerShell Module
-
Install the module:
Install-Module -Name Az -AllowClobber -Scope CurrentUser
-
Type
Y
to continue installing from the PowerShell gallery.
-
-
Challenge
Connect the Azure Account and Create a VM
-
From the PowerShell prompt, enter the command
Connect-AzAccount
to connect to Azure. -
Go to
https://microsoft.com/devicelogin
, and enter the code provided in the terminal. -
Enter the username and password provided with this hands-on lab.
-
Enter the following to create a new Azure VM:
New-AzVM ` -ResourceGroupName '<RESOURCE_GROUP_NAME_PROVIDED_IN_LAB>' ` -Name 'myvm1234' ` -Location 'westus' ` -VirtualNetworkName '<VIRTUAL_NETWORK_NAME_PROVIDED_IN_LAB>' ` -SubnetName 'default' ` -SecurityGroupName '<NSG_PROVIDED_WITH_LAB>' ` -PublicIpAddressName 'myvm1234pubip' ` -OpenPorts 80,3389
-
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.