Add-AzEnvironment
Adds endpoints and metadata for an instance of Azure Resource Manager.
Syntax
Name (Default)
Add-AzEnvironment
[-Name] <String>
[[-PublishSettingsFileUrl] <String>]
[[-ServiceEndpoint] <String>]
[[-ManagementPortalUrl] <String>]
[[-StorageEndpoint] <String>]
[[-ActiveDirectoryEndpoint] <String>]
[[-ResourceManagerEndpoint] <String>]
[[-GalleryEndpoint] <String>]
[[-ActiveDirectoryServiceEndpointResourceId] <String>]
[[-GraphEndpoint] <String>]
[[-AzureKeyVaultDnsSuffix] <String>]
[[-AzureKeyVaultServiceEndpointResourceId] <String>]
[[-TrafficManagerDnsSuffix] <String>]
[[-SqlDatabaseDnsSuffix] <String>]
[[-AzureDataLakeStoreFileSystemEndpointSuffix] <String>]
[[-AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix] <String>]
[[-AdTenant] <String>]
[[-GraphAudience] <String>]
[[-DataLakeAudience] <String>]
[[-BatchEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpoint] <String>]
[-EnableAdfsAuthentication]
[-AzureAnalysisServicesEndpointSuffix <String>]
[-AzureAnalysisServicesEndpointResourceId <String>]
[-AzureAttestationServiceEndpointSuffix <String>]
[-AzureAttestationServiceEndpointResourceId <String>]
[-AzureSynapseAnalyticsEndpointSuffix <String>]
[-ContainerRegistryEndpointSuffix <String>]
[-AzureSynapseAnalyticsEndpointResourceId <String>]
[-MicrosoftGraphEndpointResourceId <String>]
[-MicrosoftGraphUrl <String>]
[-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ARMEndpoint
Add-AzEnvironment
[-Name] <String>
[[-StorageEndpoint] <String>]
[-ARMEndpoint] <String>
[[-AzureKeyVaultDnsSuffix] <String>]
[[-AzureKeyVaultServiceEndpointResourceId] <String>]
[[-DataLakeAudience] <String>]
[[-BatchEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpoint] <String>]
[-AzureAnalysisServicesEndpointSuffix <String>]
[-AzureAnalysisServicesEndpointResourceId <String>]
[-AzureAttestationServiceEndpointSuffix <String>]
[-AzureAttestationServiceEndpointResourceId <String>]
[-AzureSynapseAnalyticsEndpointSuffix <String>]
[-ContainerRegistryEndpointSuffix <String>]
[-AzureSynapseAnalyticsEndpointResourceId <String>]
[-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Discovery
Add-AzEnvironment
[-AutoDiscover]
[-Uri <Uri>]
[-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-AzEnvironment cmdlet adds endpoints and metadata to enable Azure Resource Manager cmdlets to connect with a new instance of Azure Resource Manager.
The built-in environments AzureCloud and AzureChinaCloud target existing public instances of Azure Resource Manager.
Examples
Example 1: Creating and modifying a new environment
Add-AzEnvironment -Name TestEnvironment `
-ActiveDirectoryEndpoint TestADEndpoint `
-ActiveDirectoryServiceEndpointResourceId TestADApplicationId `
-ResourceManagerEndpoint TestRMEndpoint `
-GalleryEndpoint TestGalleryEndpoint `
-GraphEndpoint TestGraphEndpoint
Name Resource Manager Url ActiveDirectory Authority
---- -------------------- -------------------------
TestEnvironment TestRMEndpoint TestADEndpoint/
Set-AzEnvironment -Name TestEnvironment `
-ActiveDirectoryEndpoint NewTestADEndpoint `
-GraphEndpoint NewTestGraphEndpoint | Format-List
Name : TestEnvironment
EnableAdfsAuthentication : False
OnPremise : False
ActiveDirectoryServiceEndpointResourceId : TestADApplicationId
AdTenant :
GalleryUrl : TestGalleryEndpoint
ManagementPortalUrl :
ServiceManagementUrl :
PublishSettingsFileUrl :
ResourceManagerUrl : TestRMEndpoint
SqlDatabaseDnsSuffix :
StorageEndpointSuffix :
ActiveDirectoryAuthority : NewTestADEndpoint
GraphUrl : NewTestGraphEndpoint
GraphEndpointResourceId :
TrafficManagerDnsSuffix :
AzureKeyVaultDnsSuffix :
DataLakeEndpointResourceId :
AzureDataLakeStoreFileSystemEndpointSuffix :
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix :
AzureKeyVaultServiceEndpointResourceId :
AzureOperationalInsightsEndpointResourceId :
AzureOperationalInsightsEndpoint :
AzureAnalysisServicesEndpointSuffix :
AzureAttestationServiceEndpointSuffix :
AzureAttestationServiceEndpointResourceId :
AzureSynapseAnalyticsEndpointSuffix :
AzureSynapseAnalyticsEndpointResourceId :
VersionProfiles : {}
ExtendedProperties : {}
BatchEndpointResourceId :
In this example we are creating a new Azure environment with sample endpoints using Add-AzEnvironment, and then we are changing the value of the ActiveDirectoryEndpoint and GraphEndpoint attributes of the created environment using the cmdlet Set-AzEnvironment.
Example 2: Discovering a new environment via Uri
<#
Uri https://configuredmetadata.net returns an array of environment metadata. The following example contains a payload for the AzureCloud default environment.
[
{
"portal": "https://portal.azure.com",
"authentication": {
"loginEndpoint": "https://login.microsoftonline.com/",
"audiences": [
"https://management.core.windows.net/"
],
"tenant": "common",
"identityProvider": "AAD"
},
"media": "https://rest.media.azure.net",
"graphAudience": "https://graph.windows.net/",
"graph": "https://graph.windows.net/",
"name": "AzureCloud",
"suffixes": {
"azureDataLakeStoreFileSystem": "azuredatalakestore.net",
"acrLoginServer": "azurecr.io",
"sqlServerHostname": ".database.windows.net",
"azureDataLakeAnalyticsCatalogAndJob": "azuredatalakeanalytics.net",
"keyVaultDns": "vault.azure.net",
"storage": "core.windows.net",
"azureFrontDoorEndpointSuffix": "azurefd.net"
},
"batch": "https://batch.core.windows.net/",
"resourceManager": "https://management.azure.com/",
"vmImageAliasDoc": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json",
"activeDirectoryDataLake": "https://datalake.azure.net/",
"sqlManagement": "https://management.core.windows.net:8443/",
"gallery": "https://gallery.azure.com/"
},
……
]
#>
Add-AzEnvironment -AutoDiscover -Uri https://configuredmetadata.net
Name Resource Manager Url ActiveDirectory Authority
---- -------------------- -------------------------
TestEnvironment TestRMEndpoint TestADEndpoint/
In this example, we are discovering a new Azure environment from the https://configuredmetadata.net
Uri.
Parameters
-ActiveDirectoryEndpoint
Specifies the base authority for Azure Active Directory authentication.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AdEndpointUrl, ActiveDirectory, ActiveDirectoryAuthority
Parameter sets
Name
Position: 5
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ActiveDirectoryServiceEndpointResourceId
Specifies the audience for tokens that authenticate requests to Azure Resource Manager or Service Management (RDFE) endpoints.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 8
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AdTenant
Specifies the default Active Directory tenant.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 17
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ARMEndpoint
The Azure Resource Manager endpoint
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ArmUrl
Parameter sets
ARMEndpoint
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AutoDiscover
Discovers environments via default or configured endpoint.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Discovery
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AzureAnalysisServicesEndpointResourceId
The resource identifier of the Azure Analysis Services resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ARMEndpoint
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AzureAnalysisServicesEndpointSuffix
The endpoint to use when communicating with the Azure Log Analytics API.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ARMEndpoint
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AzureAttestationServiceEndpointResourceId
The resource identifier of the Azure Attestation service that is the recipient of the requested token.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AzureAttestationServiceEndpointSuffix
Dns suffix of Azure Attestation service.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix
Dns Suffix of Azure Data Lake Analytics job and catalog services
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 15
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AzureDataLakeStoreFileSystemEndpointSuffix
Dns Suffix of Azure Data Lake Store FileSystem. Example: azuredatalake.net
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 14
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AzureKeyVaultDnsSuffix
Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 10
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: 10
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AzureKeyVaultServiceEndpointResourceId
Resource identifier of Azure Key Vault data service that is the recipient of the requested token.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 11
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: 11
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AzureOperationalInsightsEndpoint
The endpoint to use when communicating with the Azure Log Analytics API.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 22
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: 22
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AzureOperationalInsightsEndpointResourceId
The audience for tokens authenticating with the Azure Log Analytics API.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 21
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: 21
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AzureSynapseAnalyticsEndpointResourceId
The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AzureSynapseAnalyticsEndpointSuffix
Dns suffix of Azure Synapse Analytics.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-BatchEndpointResourceId
The resource identifier of the Azure Batch service that is the recipient of the requested token
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: BatchResourceId, BatchAudience
Parameter sets
Name
Position: 20
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: 20
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ContainerRegistryEndpointSuffix
Suffix of Azure Container Registry.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-DataLakeAudience
The audience for tokens authenticating with the AD Data Lake services Endpoint.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: DataLakeEndpointResourceId, DataLakeResourceId
Parameter sets
Name
Position: 19
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: 19
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-DefaultProfile
The credentials, tenant and subscription used for communication with azure
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnableAdfsAuthentication
Indicates that Active Directory Federation Services (ADFS) on-premise authentication is allowed.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: OnPremise
Parameter sets
Name
Position: 16
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-GalleryEndpoint
Specifies the endpoint for the Azure Resource Manager gallery of deployment templates.
The parameter is to set the value to GalleryUrl
of PSAzureEnvironment
. As GalleryUrl
is removed from ArmMetadata, Azure PowerShell will no longer provide for the value and so it is not recommended to set GalleryEndpoint
anymore.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Gallery, GalleryUrl
Parameter sets
Name
Position: 7
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-GraphAudience
The audience for tokens authenticating with the AD Graph Endpoint.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: GraphEndpointResourceId, GraphResourceId
Parameter sets
Name
Position: 18
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-GraphEndpoint
Specifies the URL for Graph (Active Directory metadata) requests.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Graph, GraphUrl
Parameter sets
Name
Position: 9
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ManagementPortalUrl
Specifies the URL for the Management Portal.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 3
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-MicrosoftGraphEndpointResourceId
The resource identifier of Microsoft Graph
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-MicrosoftGraphUrl
Microsoft Graph Url
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Name
Specifies the name of the environment to add.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ARMEndpoint
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PublishSettingsFileUrl
Specifies the URL from which .publishsettings files can be downloaded.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 1
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceManagerEndpoint
Specifies the URL for Azure Resource Manager requests.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ResourceManager, ResourceManagerUrl
Parameter sets
Name
Position: 6
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user.
Parameter properties
Type: ContextModificationScope
Default value: None
Accepted values: Process, CurrentUser
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ServiceEndpoint
Specifies the endpoint for Service Management (RDFE) requests.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ServiceManagement, ServiceManagementUrl
Parameter sets
Name
Position: 2
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-SqlDatabaseDnsSuffix
Specifies the domain-name suffix for Azure SQL Database servers.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 13
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-StorageEndpoint
Specifies the endpoint for storage (blob, table, queue, and file) access.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: StorageEndpointSuffix
Parameter sets
Name
Position: 4
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ARMEndpoint
Position: 4
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TrafficManagerDnsSuffix
Specifies the domain-name suffix for Azure Traffic Manager services.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Name
Position: 12
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Uri
Specifies URI of the internet resource to fetch environments.
Parameter properties
Type: Uri
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Discovery
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs