Azure PowerShell

PowerShell is been around 2006 and evolved since then through different versions. What makes PowerShell more powerful is the modules that we install on it. I am going to talk about who we can use PowerShell in Azure context.

In the past, we installed Azure RM module into PowerShell to work with Azure. At the same time Azure portal had Azure something called Cloud Shell. The commands are different between AzureRM modules and Azure Cloud Shell. Microsoft realized it need to come up with a new module to remove this discrepancy. This is the reason Az module was released by Microsoft in December 2018 for general availability.

Az module was built to harness the power of PowerShell Core and Cloud Shell, and maintain compatibility with PowerShell 5.1. Az ensures that PowerShell and PowerShell Core users can get the latest Azure tooling in every PowerShell, on every platform

Az also simplifies and normalizes Azure PowerShell cmdlet and module names. Az ships in Azure Cloud Shell and is available from the PowerShell Gallery. One more great thing about Az module is its cross-platform compatibility. This means it works in MacOS and Linux variants now.

To install modules at a global scope, you need elevated privileges to install modules from the PowerShell Gallery:

>Install-Module -Name Az -AllowClobber

Frequently update your module :

Update-Module -Name Az

Note: You should not install Az side-by-side with AzureRM. Remove all AzureRM modules before installing Az.