Add-​Azure​Environment

Creates an Azure environment.

Syntax

Add-AzureEnvironment
   [-ActiveDirectoryEndpoint <String>]
   [-ActiveDirectoryServiceEndpointResourceId <String>]
   [-AdTenant <String>]
   [-AzureKeyVaultDnsSuffix <String>]
   [-AzureKeyVaultServiceEndpointResourceId <String>]
   [-EnableAdfsAuthentication]
   [-GalleryEndpoint <String>]
   [-GraphEndpoint <String>]
   [-ManagementPortalUrl <String>]
   -Name <String>
   [-Profile <AzureSMProfile>]
   [-PublishSettingsFileUrl <String>]
   [-ResourceManagerEndpoint <String>]
   [-ServiceEndpoint <String>]
   [-SqlDatabaseDnsSuffix <String>]
   [-StorageEndpoint <String>]
   [-TrafficManagerDnsSuffix <String>]
   [<CommonParameters>]

Description

The Add-AzureEnvironment cmdlet creates a new custom Azure account environment and saves it in your roaming user profile. The cmdlet returns an object that represents the new environment. When the command completes, you can use the environment in Windows PowerShell.

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 (http://www.microsoft.com/server-cloud/products/windows-azure-pack/default.aspx).

Only the Name parameter of this cmdlet is mandatory. If you omit a parameter, its value is null ($Null), and the service that uses that endpoint might not function properly. To add or change the value of an environment property, use the Set-AzureEnvironment cmdlet.

NOTE: Changing your environment can cause your account to fail. Typically, environments are added only for testing or troubleshooting.

This topic describes the cmdlet in the 0.8.10 version of the Microsoft Azure PowerShell module. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version.

Examples

Example 1: Add an Azure environment

PS C:\> Add-AzureEnvironment -Name ContosoEnv -PublishSettingsFileUrl https://contoso.com/fwlink/?LinkID=101 -ServiceEndpoint https://contoso.com/fwlink/?LinkID=102

Name                          : ContosoEnv

PublishSettingsFileUrl        : https://contoso.com/fwlink/?LinkID=101

ServiceEndpoint               : https://contoso.com/fwlink/?LinkID=102

ResourceManagerEndpoint       : 

ManagementPortalUrl           : 

ActiveDirectoryEndpoint       : 

ActiveDirectoryCommonTenantId : 

StorageEndpointSuffix         : 

StorageBlobEndpointFormat     : 

StorageQueueEndpointFormat    : 

StorageTableEndpointFormat    : 

GalleryEndpoint               :

This command creates the ContosoEnv Azure environment.

Required Parameters

-Name

Specifies a name for the environment. This parameter is required. Do not use the names of the default environments, AzureCloud and AzureChinaCloud.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-ActiveDirectoryEndpoint

Specifies the endpoint for Azure Active Directory authentication in the new environment.

Type:String
Aliases:AdEndpointUrl, ActiveDirectory, ActiveDirectoryAuthority
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ActiveDirectoryServiceEndpointResourceId

Specifies the resource ID of a management API whose access is managed by Azure Active Directory.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AdTenant
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AzureKeyVaultDnsSuffix
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AzureKeyVaultServiceEndpointResourceId
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-EnableAdfsAuthentication
Type:SwitchParameter
Aliases:OnPremise
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-GalleryEndpoint

Specifies the endpoint for the Azure Resource Manager gallery, which stores resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for Get-AzureResourceGroupGalleryTemplatehttp://go.microsoft.com/fwlink/?LinkID=393052.

Type:String
Aliases:Gallery, GalleryUrl
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-GraphEndpoint
Type:String
Aliases:Graph, GraphUrl
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ManagementPortalUrl

Specifies the URL of the Azure Management Portal in the new environment.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False
-PublishSettingsFileUrl

Specifies the URL of the publish settings files for your account. 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
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceManagerEndpoint

Specifies 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 (http://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (http://go.microsoft.com/fwlink/?LinkID=394767).

Type:String
Aliases:ResourceManager, ResourceManagerUrl
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServiceEndpoint

Specifies the URL of the Azure service endpoint. 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
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SqlDatabaseDnsSuffix
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-StorageEndpoint

Specifies the default endpoint of storage services in the new environment.

Type:String
Aliases:StorageEndpointSuffix
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TrafficManagerDnsSuffix
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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