In this short video we explain and demonstrate how to connect PowerShell to AzureAD AzureRM & AzureCLI:
How to Connect to AzureAD?
- Launch a PowerShell as an administrator
- Make sure you are running PowerShell 5.0 or newer:
$PSVersionTable.PSVersion
- Install the required module:
Install-Module MSOnline
- Sign into Azure:
Connect-MsolService
- Run your commands:
How to Connect to AzureRM (aka. Azure Resource Manager – ARM)?
- Launch a PowerShell as an administrator
- Make sure you are running PowerShell 5.0 or newer:
$PSVersionTable.PSVersion
- Install the Azure Resource Manager module:
Install-Module AzureRM
- Activate the Azure Resource Manager module:
Import-Module AzureRM<
/li>
- Sign into Azure:
Connect-AzureRmAccount
- Run your commands:
Get-AzureRmTenant
How to Connect to AzureCLI (aka. Azure Command Line Interface)?
- Launch a PowerShell as an administrator
- Make sure you are running PowerShell 5.0 or newer:
$PSVersionTable.PSVersion
- 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
- Sign into Azure:
az login
- Run your commands:
az extension list-available --output table
0 Comments