Here is why we need to use Az Module for all Azure PowerShell Scripting needs:
In the past, Azure RM module was installed 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 is cross-platform compatible. This means it works in MacOS and Linux variants now.
To install Az module in global scope, open PowerShell at elevated privilege mode and issue the following command:
Install-Module -Name Az -AllowClobber