Share via


Get-AzureLocation

Get-AzureLocation

Gets resource types and Azure data center locations that support them.

Syntax

Parameter Set: Default
Get-AzureLocation [-Profile <AzureProfile> ] [ <CommonParameters>]

Detailed Description

The Get-AzureLocation cmdlet gets the Azure data center locations that support each resource type. This cmdlet returns all resource types and locations.

A resource is a user-managed entity, such as a website, database server, or database. When you create a resource, you must specify a location. Not every location supports all resource types. Before you create your resources, use this cmdlet to find a location for each resource.

Azure resources are members of resource groups, which is a collection of resources that you deploys as a unit. A resource group has a location, but the group and its members do not have to be in the same location.

Parameters

-Profile<AzureProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Azure.Commands.ResourceManagement.Models.PSResourceProviderType

    This cmdlet returns resources and the locations that support them.

Examples

Example 1: Get all locations

This command gets all resources and the locations that support them.

Get-AzureLocation

Example 2: Get locations that support websites

This command gets all resources and the locations that support them. The command passes the results to the Where-Object cmdlet by using the pipeline operator. That cmdlet returns only the locations that match the specified string. The command returns resources that have names that include the strings web and site, in that order.

Get-AzureLocation | Where-Object -Property "Name" -Like "*web*site*" 

Where-Object