Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task 04 - Install the PowerShell Az module

Introduction

The Az PowerShell module is a set of cmdlets for managing Azure resources directly from PowerShell. It’s the recommended module for interacting with Azure, replacing the older AzureRM module. You’ll use PowerShell Az module commands in this lab.

Description

In this task, you’ll install the Az PowerShell module.

The key steps are as follows:

  1. Run a command to install the Az PowerShell module.
  2. Verify that the module is correctly installed.

Success Criteria

  • You’ve successfully installed the Az PowerShell module.

Learning Resources

Solution

Expand this section to view the solution
  1. Enter the following command at the Terminal window prompt. This command installs the PowerShell Az module.

     Install-Module -Name Az -AllowClobber -Scope CurrentUser
    

    k466c8rr.png

  2. Select A to install the modules from PSGallery and then select Enter. Wait for the installation to complete.

    It may take 2-3 minutes for the installation to complete. The Terminal window may become temporarily unresponsive during installation.

  3. Enter the following command at the Terminal window prompt and then select Enter. This command verifies that the Az module is properly installed.

     Get-InstalledModule -Name Az
    

    r8xcx9ri.png

  4. Leave Visual Studio Code open. You’ll use the tool again in the next task.