How to Install the Azure PowerShell Az Module on Windows

Azure and PowerShell blog title with automation and cloud management theme
Explore automation and cloud management with Azure and PowerShell in this blog.

How to Install the Azure PowerShell Az Module on Windows

If you manage Microsoft Azure from a Windows machine, Azure PowerShell is one of the most useful tools you can add to your admin toolkit. The current module, called Az, lets you create, configure, and manage Azure resources directly from PowerShell, making it ideal for repeatable tasks, automation, and day-to-day cloud administration.

In this guide, I’ll walk through the recommended Windows installation route using the PowerShell Gallery, show you how to verify the installation, and explain how to sign in to your Azure account once the module is ready.

Before You Start

Microsoft recommends using PowerShell 7 or later with the Az PowerShell module. Before installing, it is also worth checking whether the older AzureRM module is installed, as AzureRM has been replaced by Az and can cause confusion on older systems.

Step 1: Open PowerShell as Administrator

Start by opening PowerShell with administrator privileges. On Windows, right-click the PowerShell icon and select Run as administrator. This helps avoid permission issues during installation.

Step 2: Check Your PowerShell Version

Run the following command to confirm the version of PowerShell installed on your machine:

$PSVersionTable.PSVersion

If you are setting up a new environment, install PowerShell 7 or later before continuing. This gives you the cleanest and most future-friendly setup for the Az module.

Step 3: Set the Execution Policy

The execution policy controls whether PowerShell can run scripts on your machine. For the current user, set it to RemoteSigned by running:

Set-ExecutionPolicy –ExecutionPolicy RemoteSigned -Scope CurrentUser

Step 4: Install the Az PowerShell Module

Next, install the Az module from the PowerShell Gallery. This command downloads the rollup module and makes the Azure PowerShell cmdlets available in your session:

Install-Module -Name Az -Repository PSGallery -Force

If PowerShell prompts you to trust the repository or install a required provider, review the prompt and confirm if you are happy to continue.

Step 5: Verify the Installation

Once the installation completes, check that the Az module is installed and view the available version:

Get-InstalledModule -Name Az –AllVersions | Select Name, Version

Step 6: Sign In to Azure

To start managing Azure resources, sign in with your Azure account:

Connect-AzAccount

A browser window will open so you can authenticate. After signing in, you can run Azure PowerShell commands against your subscriptions and resources.

Keeping the Az Module Updated

Azure PowerShell is updated regularly, so it is good practice to update the module from time to time:

Update-Module -Name Az -Force

Final Thoughts

Installing the Azure PowerShell Az module on Windows is straightforward once you have the right PowerShell version and execution policy in place. For most new setups, PowerShell 7 or later plus the PowerShell Gallery installation method is the best starting point.

Once installed, you can use Azure PowerShell to automate common admin jobs, inspect resources, manage subscriptions, and build repeatable workflows without relying entirely on the Azure portal.

Leave a Reply