Share via


Set-AzureRmEnvironment

Sets properties for an Azure environment.

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

Name (Default)

Set-AzureRmEnvironment
    [-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>]
    [[-AzureAnalysisServicesEndpointSuffix] <String>]
    [-EnableAdfsAuthentication]
    [-Scope <ContextModificationScope>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ARMEndpoint

Set-AzureRmEnvironment
    [-Name] <String>
    [[-StorageEndpoint] <String>]
    [-ARMEndpoint] <String>
    [[-AzureKeyVaultDnsSuffix] <String>]
    [[-AzureKeyVaultServiceEndpointResourceId] <String>]
    [[-DataLakeAudience] <String>]
    [[-BatchEndpointResourceId] <String>]
    [[-AzureOperationalInsightsEndpointResourceId] <String>]
    [[-AzureOperationalInsightsEndpoint] <String>]
    [-Scope <ContextModificationScope>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-AzureRMEnvironment cmdlet sets endpoints and metadata for connecting to an instance of Azure.

Examples

Example 1: Creating and modifying a new environment

PS C:\> Add-AzureRmEnvironment -Name TestEnvironment `
        -ActiveDirectoryEndpoint TestADEndpoint `
        -ActiveDirectoryServiceEndpointResourceId TestADApplicationId `
        -ResourceManagerEndpoint TestRMEndpoint `
        -GalleryEndpoint TestGalleryEndpoint `
        -GraphEndpoint TestGraphEndpoint

Name            Resource Manager Url ActiveDirectory Authority
----            -------------------- -------------------------
TestEnvironment TestRMEndpoint       TestADEndpoint/

PS C:\> Set-AzureRmEnvironment -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        :

In this example we are creating a new Azure environment with sample endpoints using Add-AzureRmEnvironment, and then we are changing the value of the ActiveDirectoryEndpoint and GraphEndpoint attributes of the created environment using the cmdlet Set-AzureRmEnvironment.

Parameters

-ActiveDirectoryEndpoint

Specifies the base authority for Microsoft Entra 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

-AzureAnalysisServicesEndpointSuffix

Dns Suffix of Azure Analysis Services service endpoints

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

-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

Specifies the domain name suffix for Key Vault services.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:10
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-AzureKeyVaultServiceEndpointResourceId

Specifies the audience for access tokens that authorize requests for Key Vault services.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:11
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-AzureOperationalInsightsEndpoint

Specifies the endpoint for the Operational Insights query access.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:22
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-AzureOperationalInsightsEndpointResourceId

Specifies the audience for access tokens that authorize requests for Operational Insights services.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:21
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

(All)
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

-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

(All)
Position:19
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant and subscription used for communication with azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases: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.

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

-Name

Specifies the name of the environment to modify.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
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

(All)
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

-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.

Inputs

String

SwitchParameter

Outputs

PSAzureEnvironment