你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzEnvironment

获取 Azure 服务的实例的终结点和元数据。 GalleryUrl 将从 ArmMetadata 中删除,因此 Azure PowerShell 将不再在 PSAzureEnvironment中提供其值。 Azure PowerShell 产品当前未使用 GalleryUrl。 请不再回复 GalleryUrl

语法

Default (默认值)

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

说明

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 通信的凭据、帐户、租户和订阅。

参数属性

类型:IAzureContextContainer
默认值:None
支持通配符:False
不显示:False
别名:AzContext, AzureRmContext, AzureCredential

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Name

指定要获取的 Azure 实例的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:0
必需:False
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

String

输出

PSAzureEnvironment