Get-AzEnvironment

取得 Azure 服務實例的端點和元數據。 GalleryUrl 將會從 ArmMetadata 中移除,因此 Azure PowerShell 將不再提供其在 中的 PSAzureEnvironment值。 Azure PowerShell 產品目前 GalleryUrl 未使用。 請不再回復 GalleryUrl

Syntax

Get-AzEnvironment
   [[-Name] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Get-AzEnvironment Cmdlet 會取得 Azure 服務實例的端點和元數據。

範例

範例 1:取得所有 Azure 環境

Get-AzEnvironment

Name              Resource Manager Url                  ActiveDirectory Authority          Type
----              --------------------                  -------------------------          ----
AzureUSGovernment https://management.usgovcloudapi.net/ https://login.microsoftonline.us/  Built-in
AzureCloud        https://management.azure.com/         https://login.microsoftonline.com/ Built-in
AzureChinaCloud   https://management.chinacloudapi.cn/  https://login.chinacloudapi.cn/    Built-in

此範例示範如何取得 AzureCloud (預設) 環境的端點和元數據。

範例 2:取得 AzureCloud 環境

Get-AzEnvironment -Name AzureCloud

Name       Resource Manager Url          ActiveDirectory Authority          Type
----       --------------------          -------------------------          ----
AzureCloud https://management.azure.com/ https://login.microsoftonline.com/ Built-in

此範例示範如何取得 AzureCloud (預設) 環境的端點和元數據。

範例 3:取得 AzureChinaCloud 環境

Get-AzEnvironment -Name AzureChinaCloud | Format-List

Name                                              : AzureChinaCloud
Type                                              : Built-in
EnableAdfsAuthentication                          : False
OnPremise                                         : False
ActiveDirectoryServiceEndpointResourceId          : https://management.core.chinacloudapi.cn/
AdTenant                                          : Common
GalleryUrl                                        : https://gallery.azure.com/
ManagementPortalUrl                               : https://go.microsoft.com/fwlink/?LinkId=301902
ServiceManagementUrl                              : https://management.core.chinacloudapi.cn/
PublishSettingsFileUrl                            : https://go.microsoft.com/fwlink/?LinkID=301776
ResourceManagerUrl                                : https://management.chinacloudapi.cn/
SqlDatabaseDnsSuffix                              : .database.chinacloudapi.cn
StorageEndpointSuffix                             : core.chinacloudapi.cn
ActiveDirectoryAuthority                          : https://login.chinacloudapi.cn/
GraphUrl                                          : https://graph.chinacloudapi.cn/
GraphEndpointResourceId                           : https://graph.chinacloudapi.cn/
TrafficManagerDnsSuffix                           : trafficmanager.cn
AzureKeyVaultDnsSuffix                            : vault.azure.cn
DataLakeEndpointResourceId                        : 
AzureDataLakeStoreFileSystemEndpointSuffix        : 
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix : 
AzureKeyVaultServiceEndpointResourceId            : https://vault.azure.cn
ContainerRegistryEndpointSuffix                   : azurecr.cn
AzureOperationalInsightsEndpointResourceId        : 
AzureOperationalInsightsEndpoint                  : 
AzureAnalysisServicesEndpointSuffix               : asazure.chinacloudapi.cn
AnalysisServicesEndpointResourceId                : https://region.asazure.chinacloudapi.cn
AzureAttestationServiceEndpointSuffix             : 
AzureAttestationServiceEndpointResourceId         : 
AzureSynapseAnalyticsEndpointSuffix               : dev.azuresynapse.azure.cn
AzureSynapseAnalyticsEndpointResourceId           : https://dev.azuresynapse.azure.cn

此範例示範如何取得 AzureChinaCloud 環境的端點和元數據。

範例 4:取得 AzureUSGovernment 環境

Get-AzEnvironment -Name AzureUSGovernment

Name              Resource Manager Url                  ActiveDirectory Authority         Type
----              --------------------                  -------------------------         ----
AzureUSGovernment https://management.usgovcloudapi.net/ https://login.microsoftonline.us/ Built-in

此範例示範如何取得 AzureUSGovernment 環境的端點和元數據。

參數

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

指定要取得的 Azure 實例名稱。

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

輸入

String

輸出

PSAzureEnvironment