Azure PowerShell vs. Azure RM PowerShell

In 2014, Microsoft announced the Azure Preview Portal, which was going GA in December 2015. Since January 8, 2018, the classic Azure Portal is turned off. The “Preview Portal” was more than a facelift. The classic Azure Portal was based on the Service Management mode, often called the “classic deployment model”, whereas the new Azure Portal uses the Resource Manager model. Azure Service Management (ASM) and Azure Resource Management are both deployment models. The Resource Manager model eases the deployment of complex setups by using templates to deploy, update and manage resources within a resource group as a single operation.

Azure PowerShell vs. Azure RM PowerShell

Different deployment models require different tools. Because of this, Microsoft offers two PowerShell modules for Azure. Depending on your deployment type, you have to use the Azure or AzureRM module. Both can be installed directly from the PowerShell Gallery using Install-Module -Name Azure or Install-Module -Name AzureRM .

Connect to Azure

Depending on the used module, the ways to connect to Azure differ.

Module AzureRM

PS C:\Users\p.terlisten> Connect-AzureRmAccount -Subscription 37cbb19b-cc7f-402a-xxxx-yxcvbnmasdfg

Account          : patrick@blazilla.de
SubscriptionName : vcloudnine Azure Lab
SubscriptionId   : 37cbb19b-cc7f-402a-xxxx-yxcvbnmasdfg
TenantId         : 2795c72a-aad7-404e-xxxx-yxcvbnmasdfg
Environment      : AzureCloud

PS C:\Users\p.terlisten>

You will notice, that AzureRM sessions does not persist between PowerShell sessions. This behaviour differs from Add-AzureAccount . But you can save and load your AzureRM session once you are connected.

PS C:\Users\p.terlisten> Save-AzureRmContext -Path X:\Secure\azurerm.json
PS C:\Users\p.terlisten> Import-AzureRmContext -Path X:\Secure\azurerm.json

Module Azure

PS C:\Users\p.terlisten> Add-AzureAccount

Id                  Type Subscriptions                           Tenants
-- ---- ------------- -------
patrick@blazilla.de User 37cbb19b-cc7f-402a-xxxx-yxcvbnmasdfg... {2795c72a-aad7-404e-xxxx-yxcvbnmasdfg}

PS C:\Users\p.terlisten>