Set-AzureEnvironment

Changes the properties of an Azure environment.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Set-AzureEnvironment
   -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>]
   [-EnableAdfsAuthentication]
   [-AdTenant <String>]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The Set-AzureEnvironment cmdlet changes the properties of an Azure environment. It returns an object that represents the environment with its new property values. Use the Name parameter to identify the environment and the other parameters to change property values. You cannot use Set-AzureEnvironment to change the name of an Azure environment.

An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack.

NOTE: Do not change the properties of the AzureCloud or AzureChinaCloud environments. Use this cmdlet to change the values of private environments that you create.

Examples

Example 1: Change environment properties

PS C:\> Set-AzureEnvironment -Name ContosoEnv -PublishSettingsFileUrl "https://contoso.com" -StorageEndpoint "contoso.com"

This command changes the values of the PublishSettingsFileUrl and StorageEndpoint properties of the ContosoEnv environment.

Parameters

-ActiveDirectoryEndpoint

Changes the endpoint for Microsoft Entra authentication to the specified value.

Type:String
Aliases:AdEndpointUrl, ActiveDirectory, ActiveDirectoryAuthority
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ActiveDirectoryServiceEndpointResourceId

Specifies the resource ID of a management API whose access is managed by Microsoft Entra ID.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-AdTenant

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-AzureKeyVaultDnsSuffix

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-AzureKeyVaultServiceEndpointResourceId

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-EnableAdfsAuthentication

Type:SwitchParameter
Aliases:OnPremise
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-GalleryEndpoint

Changes the endpoint for the Azure Resource Manager gallery to the specified value. The gallery endpoint is the location for resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for Get-AzureResourceGroupGalleryTemplate.

Type:String
Aliases:Gallery, GalleryUrl
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-GraphEndpoint

Type:String
Aliases:Graph, GraphUrl
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ManagementPortalUrl

Changes the URL of the Azure Management Portal to the specified value.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Name

Identifies the environment that is being changed. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PublishSettingsFileUrl

Changes the URL for publish settings files in the specified environment. An Azure publish settings file is an XML file that contains information about your account and a management certificate that allows Windows PowerShell to sign into your Azure account on your behalf.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ResourceManagerEndpoint

Changes the endpoint for Azure Resource Manager data, including data about resource groups associated with the account. For more information about Azure Resource Manager, see Azure Resource Manager Cmdlets (https://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (https://go.microsoft.com/fwlink/?LinkID=394767).

Type:String
Aliases:ResourceManager, ResourceManagerUrl
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ServiceEndpoint

Changes the URL of the Azure service endpoint in the specified environment. The Azure service endpoint determines whether your application is managed by the global Azure platform, Azure operated by 21Vianet in China, or a private Azure installation.

Type:String
Aliases:ServiceManagement, ServiceManagementUrl
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-SqlDatabaseDnsSuffix

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-StorageEndpoint

Changes the default endpoint of storage services in the specified environment.

Type:String
Aliases:StorageEndpointSuffix
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TrafficManagerDnsSuffix

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

None

You can pipe input to this cmdlet by property name, but not by value.

Outputs

Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment