- Lab
- A Cloud Guru
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.
Path 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
-
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.