Skip to main content

Azure Powershell

Learn

Command lines

CommandDescription
Install-Module -Name Az -AllowClobberInstall Az Module (from an Admin window)
Get-InstalledModule -Name Az -AllVersionsReview the installed version
Connect-AzAccountConnect to your account
Get-AzSubscriptionList available subscriptions
Get-AzContextGet current context
Select-AzSubscription -SubscriptionName "xxxx"Set the current subscription
Get-AzResource -ResourceGroupName "xxxx" -ResourceName "yyyyy"List resources

Recipes

  • Change the current context: Get-AzSubscription -SubscriptionId "xxxx-xxxx-xxxx-xxxx" -TenantId "yyyy-yyyy-yyyy-yyyy" | Set-AzContext
  • Get information on a web application: Get-AzWebApp -name "xxxx" | Format-List