How To Install and Update Azure PowerShell on Windows Machine?
Last Updated :
16 Jul, 2023
Pre-requisite: Azure
Azure PowerShell is a command-line tool that allows you to manage Azure resources from the command line. It is a powerful tool that can be used to automate tasks, provision resources, manage users and policies in Azure a,d also for troubleshooting problems. Actually, Azure PowerShell is built on top of Windows PowerShell, so if you are familiar with PowerShell, you will be able to pick up Azure PowerShell quickly.
To install this we will be using PowerShellGet which is a module that allows you to install PowerShell modules from the PowerShell Gallery. Follow the steps to get started.
Steps to Install Azure PowerShell on Windows Machine
Step 1: To install Azure PowerShell using PowerShellGet, you need to open PowerShell as an administrator.
Step 2: Verify PowerShell Version
Make sure that you are running a supported version of PowerShell. The minimum supported version is PowerShell 5.0 and above. Run the following command to check the PowerShell version:
$PSVersionTable.PSVersion

Step 3: Run the following command to set the PowerShell execution policy to remote signed >> Select 'Y' to proceed.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Step 4: Run the following command to install the latest version of the Az PowerShell module.
Install-Module -Name Az
This will install the latest version of the Az PowerShell module.
or
Run the following command to install the latest version of the Az PowerShell module to PSGallery Repository at force. For this NuGet provider is required if it ask for NuGet provider type 'Y' to continue.
Install-Module -Name Az -Repository PSGallery -Force
This process takes around 15-20 minutes to install all the Az module packages wait until it gets completed and then proceed to Step 5.
Step 5: Once you have installed Azure PowerShell, you can use this command to verify the installation:
Get-InstalledModule -Name Az -AllVersions | select Name,Version

You can also verify the installation by running the following command by connecting your Azure Account:
Connect-AzAccount
Next, you will get a Microsoft Azure popup to sign in interactively >> Enter your Azure username and password to get started.
How to Update the existing Azure PowerShell Modules on Windows Machine?
To Update Az Modules you need to just run the following command to update Az modules.
Update-Module -Name Az -Force

Troubleshooting Installation or Update Issues
If you are having problems installing or updating Azure PowerShell, Check the system logs for any errors that might have occurred during the installation or update process. Try uninstalling and reinstalling Azure PowerShell. Make sure that you have the latest version of the PowerShellGet module installed. You can install the PowerShellGet module by running the following command. Run this command only when needed.
Install-Module -Name PowerShellGet -Force
Similar Reads
How to Install Linux on Windows PowerShell Subsystem? There are several ways to Install a Linux subsystem on your Windows PC Powershell Environment. It is good for learners, but it is recommended using original Linux OS if you are a developer as the Subsystem lacks the pre-installed Linux tools. Before we begin installing a Linux subsystem, we need to
2 min read
How to Install and Use NVM on Windows NVM or Node Version Manager is a command-line tool that allows developers to manage multiple versions of Node.js on a single machine. This function offers the flexibility to work on different projects and versions of Node.js. In this guide, we'll walk you through the steps to install and use NVM on
3 min read
How to Install Power BI on Windows? Power BI is a business analytics tool developed by Microsoft where "BI" stands for Business Intelligence. It is used to connect, visualize and analyze data from various sources. You can create interactive dashboards, reports, graphs and charts with just a few clicks. Power BI also helps with data cl
3 min read
How to Install Git on Windows Command Line? Git is an open-source and free, decentralized version control system designed to handle projects of all sizes with speed and efficiency. Basically, it is a software tracking application that is commonly used to monitor projects across several teams. The best way of downloading and installing Git on
3 min read
How to Download and Install Postman on Windows? Postman is a platform for building and using APIs and helps for simplifying the steps in the APIs lifecycles to streamline collaboration for creating faster APIs. It includes various API tools to accelerate the development cycle, including the design mockups and testing documentation, etc. Postman w
2 min read
How to Install Visual Studio Code on Windows? Visual Studio Code (VS Code) is a free, lightweight, and open-source code editor developed by Microsoft. It supports multiple operating systems, including Windows, macOS, and Linux. VS Code is designed to be versatile and user-friendly, offering features such as:Syntax Highlighting and Autocompletio
3 min read
How to Download and Install Xshell 7 Personal on Windows? SSH1, SSH2, SFTP, TELNET, RLOGIN, and SERIAL are all supported by the potent terminal emulator Xshell. With a performance that is unmatched in the industry, Xshell offers a variety of features and benefits that are unique among SSH clients. Xshell 7 now has additional features that make managing you
2 min read
How to Install the Windows Subsystem for Linux on Windows 11? As a programmer, it is very important to test software on multiple platforms. However, it can be very tedious and inefficient to use multiple virtual machines to achieve the same. Thankfully, this process can be simplified if you are using Windows and wish to run a Linux distribution - with WSL. WSL
2 min read
How to Install PHP Composer on Windows? Composer is essentially a package manager for PHP. You can effectively manage libraries and packages in your PHP projects by using Composer, a dependency management for PHP. Composer makes package management easier for both small and large-scale applications by automating the installation and update
3 min read
How to Install Magento2 on Windows? Magento is a powerful open-source e-commerce web application written in PHP. It was developed by Magento, inc 31 march 2008. Magento was built using the Zend framework, it uses entity attribute value(EAV) database model to store value and there is an only free version available by the Magento commun
4 min read