Azure PowerShell is a set of cmdlets for managing Azure resources directly from the PowerShell command line.
Azure PowerShell is designed to make it easy to learn and get started with but provides powerful features for automation.
Install the Azure PowerShell modules using PowerShellGet :
Azure PowerShell works with PowerShell 5.1 or higher on Windows, or PowerShell Core 6.x and later on all platforms. If you aren't sure if you have PowerShell, or are on macOS or Linux, install the latest version of PowerShell Core.
To check your PowerShell version, run the command:
Install the Azure PowerShell module:
The recommended install method is to only install for the active user:
Install-Module -Name Az -AllowClobber -Scope CurrentUser
If you want to install for all users on a system, this requires administrator privileges. From an elevated PowerShell session either run as administrator or with the sudo command on macOS or Linux:
Install-Module -Name Az -AllowClobber -Scope AllUsers
By default, the PowerShell gallery isn't configured as a trusted repository for PowerShellGet. The first time you use the PSGallery you see the following prompt:
You are installing the modules from an untrusted repository. If you trust this repository, change
its InstallationPolicy value by running the Set-PSRepository cmdlet.
Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):
Answer Yes or Yes to All to continue with the installation.
The Az module is a rollup module for the Azure PowerShell cmdlets. Installing it downloads all of the available Azure Resource Manager modules, and makes their cmdlets available for use.
Hope it helps!
If you need to know more about Azure, then you should join Azure cloud certification course today.