Share via


Get-AzureRmLocation

Get-AzureRmLocation

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

Syntax

Get-AzureRmLocation [ <CommonParameters>]

Detailed Description

The Get-AzureRmLocation 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

<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.

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.

PS C:\> Get-AzureRmLocation

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.

PS C:\> Get-AzureRmLocation | Where-Object Name -like "*web*site*"

Where-Object