Retrieves information about Azure locations.
The Get-AzLocation cmdlet retrieves information about Azure locations that are available for your subscription.
This cmdlet can be used to discover which locations are available for deploying Azure resources and to obtain details such as the display name and geographic region of each location.
| Command | Parameters | 
|---|---|
| Get-AzLocation | [ [ [ [ [ | 
| Name | Description | Type | Required? | 
|---|---|---|---|
| -Location | Specifies the name of a location to retrieve. You can specify multiple location names, separated by commas. | String[] | No | 
| -WarningAction | Gets or sets the action to take for a warning, such as "Continue", "SilentlyContinue", or "Stop". | System.Management.Automation.ActionPreference | No | 
| -WarningVariable | Gets or sets a variable in which to store warning messages. | String | No | 
| -ErrorAction | Gets or sets the action to take for an error, such as "Continue", "SilentlyContinue", or "Stop". | System.Management.Automation.ActionPreference | No | 
| -ErrorVariable | Gets or sets a variable in which to store error messages. | String | No | 
This command retrieves all Azure locations available for your subscription.
Get-AzLocationThis command retrieves information about the "East US" Azure location.
Get-AzLocation -Location "East US"This command retrieves information about the "West US" and "Central US" Azure locations.
Get-AzLocation -Location "West US", "Central US"You can use the output of this cmdlet to specify a location when creating Azure resources using other Azure PowerShell cmdlets.
The available locations can vary based on your Azure subscription and region.
Install-Module -Name Az.Resources