共用方式為


Get-AzLocation

取得每個位置的所有位置和支援的資源提供者。

語法

Default (預設值)

Get-AzLocation
    [-ExtendedLocation <Boolean>]
    [-ApiVersion <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Get-AzLocation Cmdlet 會取得每個位置的所有位置和支援的資源提供者。

範例

範例 1:取得所有位置和支援的資源提供者

Get-AzLocation

此命令會取得每個位置的所有位置和支援的資源提供者。

範例 2:取得支援資源提供者 Microsoft.AppConfiguration 的所有位置

Get-AzLocation | Where-Object {$_.Providers -contains "Microsoft.AppConfiguration"}
Location    : eastasia
DisplayName : East Asia
Providers   : {Microsoft.Devices, Microsoft.Cache, Microsoft.AppConfiguration, microsoft.insights…}

Location    : southeastasia
DisplayName : Southeast Asia
Providers   : {Microsoft.Devices, Microsoft.Cache, Microsoft.AppConfiguration, microsoft.insights…}

Location    : centralus
DisplayName : Central US
Providers   : {Microsoft.Devices, Microsoft.Cache, Microsoft.AppConfiguration, microsoft.insights…}
...

此範例會取得支援資源提供者 「Microsoft.AppConfiguration」 的所有位置。

參數

-ApiVersion

指定資源提供者支援的 API 版本。 您可以指定與預設版本不同的版本。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-DefaultProfile

用來與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶

參數屬性

類型:IAzureContextContainer
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzContext, AzureRmContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ExtendedLocation

是否包含延伸位置。

參數屬性

類型:

Nullable<T>[Boolean]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Pre

指出此 Cmdlet 在自動決定要使用的版本時,會考慮發行前 API 版本。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

None

輸出

PSResourceProviderLocation