Finding Azure locations with PowerShell

Sometimes when you are on the Azure Cloud Shell console, and you need to deploy a resource in a region that you don’t use often, you realize you don’t remember the name. You can go to the Azure Portal, which kind of defeats the purpose of being in the console. Fortunately, there is a PowerShell cmdlet to list all Azure locations. I want to introduce you to the Get-AzLocation cmdlet, which retrieves the Azure regions available, as depicted in the image below. Here’s what this simple cmdlet looks like:

Get-AzLocation

Azure locations PowerShell

You can always use PowerShell to narrow down the Azure location results. For example, find all regions in Canada or even something more granular, like finding all the regions that have “South” in their name.

Azure locations PowerShell

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top