你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzEnvironment
Sets properties for an Azure environment.
Syntax
Set-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>]
[-EnableAdfsAuthentication]
[[-AdTenant] <String>]
[[-GraphAudience] <String>]
[[-DataLakeAudience] <String>]
[[-BatchEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpoint] <String>]
[-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>]
Set-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>]
Description
The Set-AzEnvironment cmdlet sets endpoints and metadata for connecting to an instance of Azure.
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
ActiveDirectoryServiceEndpointResourceId : TestADApplicationId
AdTenant :
GalleryUrl : TestGalleryEndpoint
ManagementPortalUrl :
ServiceManagementUrl :
PublishSettingsFileUrl :
ResourceManagerUrl : TestRMEndpoint
SqlDatabaseDnsSuffix :
StorageEndpointSuffix :
ActiveDirectoryAuthority : NewTestADEndpoint
GraphUrl : NewTestGraphEndpoint
GraphEndpointResourceId :
TrafficManagerDnsSuffix :
AzureKeyVaultDnsSuffix :
AzureDataLakeStoreFileSystemEndpointSuffix :
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix :
AzureKeyVaultServiceEndpointResourceId :
BatchEndpointResourceId :
AzureOperationalInsightsEndpoint :
AzureOperationalInsightsEndpointResourceId :
AzureAttestationServiceEndpointSuffix :
AzureAttestationServiceEndpointResourceId :
AzureSynapseAnalyticsEndpointSuffix :
AzureSynapseAnalyticsEndpointResourceId :
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.
Parameters
-ActiveDirectoryEndpoint
Specifies the base authority for Azure Active Directory authentication.
Type: | String |
Aliases: | AdEndpointUrl, ActiveDirectory, ActiveDirectoryAuthority |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ActiveDirectoryServiceEndpointResourceId
Specifies the audience for tokens that authenticate requests to Azure Resource Manager or Service Management (RDFE) endpoints.
Type: | String |
Position: | 8 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AdTenant
Specifies the default Active Directory tenant.
Type: | String |
Position: | 17 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ARMEndpoint
The Azure Resource Manager endpoint.
Type: | String |
Aliases: | ArmUrl |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureAnalysisServicesEndpointResourceId
The resource identifier of the Azure Analysis Services resource.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureAnalysisServicesEndpointSuffix
The endpoint to use when communicating with the Azure Log Analytics API.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureAttestationServiceEndpointResourceId
The The resource identifier of the Azure Attestation service that is the recipient of the requested token.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureAttestationServiceEndpointSuffix
Dns suffix of Azure Attestation service.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix
Dns Suffix of Azure Data Lake Analytics job and catalog services
Type: | String |
Position: | 15 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureDataLakeStoreFileSystemEndpointSuffix
Dns Suffix of Azure Data Lake Store FileSystem. Example: azuredatalake.net
Type: | String |
Position: | 14 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureKeyVaultDnsSuffix
Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net
Type: | String |
Position: | 10 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureKeyVaultServiceEndpointResourceId
Resource identifier of Azure Key Vault data service that is the recipient of the requested token.
Type: | String |
Position: | 11 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureOperationalInsightsEndpoint
The endpoint to use when communicating with the Azure Log Analytics API.
Type: | String |
Position: | 22 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureOperationalInsightsEndpointResourceId
The audience for tokens authenticating with the Azure Log Analytics API.
Type: | String |
Position: | 21 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureSynapseAnalyticsEndpointResourceId
The The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AzureSynapseAnalyticsEndpointSuffix
Dns suffix of Azure Synapse Analytics.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BatchEndpointResourceId
The resource identifier of the Azure Batch service that is the recipient of the requested token
Type: | String |
Aliases: | BatchResourceId, BatchAudience |
Position: | 20 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContainerRegistryEndpointSuffix
Suffix of Azure Container Registry.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DataLakeAudience
The audience for tokens authenticating with the AD Data Lake services Endpoint.
Type: | String |
Aliases: | DataLakeEndpointResourceId, DataLakeResourceId |
Position: | 19 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableAdfsAuthentication
Indicates that Active Directory Federation Services (ADFS) on-premise authentication is allowed.
Type: | SwitchParameter |
Aliases: | OnPremise |
Position: | 16 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | String |
Aliases: | Gallery, GalleryUrl |
Position: | 7 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GraphAudience
The audience for tokens authenticating with the AD Graph Endpoint.
Type: | String |
Aliases: | GraphEndpointResourceId, GraphResourceId |
Position: | 18 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GraphEndpoint
Specifies the URL for Graph (Active Directory metadata) requests.
Type: | String |
Aliases: | Graph, GraphUrl |
Position: | 9 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ManagementPortalUrl
Specifies the URL for the Management Portal.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MicrosoftGraphEndpointResourceId
The resource identifier of Microsoft Graph
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MicrosoftGraphUrl
Microsoft Graph Url
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the environment to modify.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PublishSettingsFileUrl
Specifies the URL from which .publishsettings files can be downloaded.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceManagerEndpoint
Specifies the URL for Azure Resource Manager requests.
Type: | String |
Aliases: | ResourceManager, ResourceManagerUrl |
Position: | 6 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | ContextModificationScope |
Accepted values: | Process, CurrentUser |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceEndpoint
Specifies the endpoint for Service Management (RDFE) requests.
Type: | String |
Aliases: | ServiceManagement, ServiceManagementUrl |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SqlDatabaseDnsSuffix
Specifies the domain-name suffix for Azure SQL Database servers.
Type: | String |
Position: | 13 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageEndpoint
Specifies the endpoint for storage (blob, table, queue, and file) access.
Type: | String |
Aliases: | StorageEndpointSuffix |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TrafficManagerDnsSuffix
Specifies the domain-name suffix for Azure Traffic Manager services.
Type: | String |
Position: | 12 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |