Get-AzureRmEnvironment
Get endpoints and metadata for an instance of Azure services.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRmEnvironment
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmEnvironment cmdlet gets endpoints and metadata for an instance of Azure services.
Examples
Example 1: Getting the AzureCloud environment
PS C:\> Get-AzureRmEnvironment AzureCloud
Name Resource Manager Url ActiveDirectory Authority
---- -------------------- -------------------------
AzureCloud https://management.azure.com/ https://login.microsoftonline.com/
This example shows how to get the endpoints and metadata for the AzureCloud (default) environment.
Example 2: Getting the AzureChinaCloud environment
PS C:\> Get-AzureRmEnvironment AzureChinaCloud | Format-List
Name : AzureChinaCloud
EnableAdfsAuthentication : False
ActiveDirectoryServiceEndpointResourceId : https://management.core.chinacloudapi.cn/
AdTenant :
GalleryUrl : https://gallery.chinacloudapi.cn/
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
AzureDataLakeStoreFileSystemEndpointSuffix :
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix :
AzureKeyVaultServiceEndpointResourceId : https://vault.azure.cn
This example shows how to get the endpoints and metadata for the AzureChinaCloud environment.
Example 3: Getting the AzureUSGovernment environment
PS C:\> Get-AzureRmEnvironment AzureUSGovernment
Name Resource Manager Url ActiveDirectory Authority
---- -------------------- -------------------------
AzureUSGovernment https://management.usgovcloudapi.net/ https://login.microsoftonline.us/
This example shows how to get the endpoints and metadata for the AzureUSGovernment environment.
Parameters
-DefaultProfile
The credentials, account, tenant and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the Azure instance to get.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |