1 Dec 2022
How to install Azure-CLI module to Powershell?
Please start powershell ISE with administrator privileges and execute below commands:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Install-Module -Name Az -Repository PSGallery -Scope CurrentUser
## In case of any errors, check the current powershell(PS) version installed in your PC. It should meet the minimum required version for Az module
$PSVersionTable.PSVersion
#In case of older PS version, try below commands to get it done
Install-Module -Name PowerShellGet -Force
Get-ExecutionPolicy -List
Get-PSRepository
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
invoke-webrequest " https://www.powershellgallery.com/api/v2"
Import-Module PackageManagement -Force
Install-Module -Name PackageManagement -RequiredVersion 1.1.0.0
Register-PSRepository -Default
Get-Module PowerShellGet, PackageManagement -ListAvailable
Install-PackageProvider -Name NuGet -minimumversion 2.8.5.201 -Force
Install-Module -Name Az -Force