SOLVED: VIDEO: How to connect to AzureAD AzureRM & AzureCLI using PowerShell

In this short video we explain and demonstrate how to connect PowerShell to AzureAD AzureRM & AzureCLI:

How to Connect to AzureAD?

  1. Launch a PowerShell as an administrator
  2. Make sure you are running PowerShell 5.0 or newer:
    • $PSVersionTable.PSVersion
  3. Install the required module:
    • Install-Module MSOnline
  4. Sign into Azure:
    1. Connect-MsolService
  5. Run your commands:
    • Get-Command -Module MSOnline

How to Connect to AzureRM (aka. Azure Resource Manager – ARM)?

  1. Launch a PowerShell as an administrator
  2. Make sure you are running PowerShell 5.0 or newer:
    • $PSVersionTable.PSVersion
  3. Install the Azure Resource Manager module:
    • Install-Module AzureRM
  4. Activate the Azure Resource Manager module:
    • Import-Module AzureRM</li>
  5. Sign into Azure:
    • Connect-AzureRmAccount
  6. Run your commands:
    • Get-AzureRmTenant

How to Connect to AzureCLI (aka. Azure Command Line Interface)?

  1. Launch a PowerShell as an administrator
  2. Make sure you are running PowerShell 5.0 or newer:
    • $PSVersionTable.PSVersion
  3. Install Azure CLI software (only needs to be done once per machine you are working on)
    • Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
  4. Sign into Azure:
    • az login
  5. Run your commands:
    • az extension list-available --output table

Published by
Ian Matthews

This website uses cookies.