Monthly Archives: October 2018

Microsoft Azure Discovery Series – Azure PowerShell Az module

In this session of Cloud Ranger’s Microsoft Azure Discovery Series, I introduce the upcoming Azure PowerShell Module “Az”. I will start off with what this Az module is and how it is important as it will change how everyone uses Azure PowerShell. I will show how to install this module, use this module, and how to even make your current scripts with this module.

# Check if Azure  ARM modules are installed and what version is installed
Get-Module AzureRM -ListAvailable

# Uninstall all Azure modules (be careful before doing this. I am hoping you are doing this on a dev machine)
Get-Module AzureRM* -ListAvailable | Uninstall-Module

# Install Az PowerShell modules
Install-Module -Name Az

# Connect to the Azure account using the Az module
Add-AzAccount

# Check which subscription you are connected to
Get-AzContext

# Add an Alias to use the old Azure ARM cmdlets or scripts
Enable-AzureRmAlias

Now once you are done testing if you do not want to keep the Az modules then remove them.

# Uninstall all AZ MODULES
Get-Module Az* -ListAvailable | Uninstall-Module