Add-AzureEnvironment

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Add-AzureEnvironment

Creates an Azure environment

Syntax

Parameter Set: Default
Add-AzureEnvironment [-Name] <String> [[-PublishSettingsFileUrl] <String> ] [[-ServiceEndpoint] <String> ] [[-ManagementPortalUrl] <String> ] [[-StorageEndpoint] <String> ] [[-ActiveDirectoryEndpoint] <String> ] [[-ResourceManagerEndpoint] <String> ] [[-GalleryEndpoint] <String> ] [ <CommonParameters>]

Detailed 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 (https://www.microsoft.com/en-us/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.1 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version.

Parameters

-ActiveDirectoryEndpoint<String>

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

Aliases

none

Required?

false

Position?

6

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-GalleryEndpoint<String>

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

Aliases

none

Required?

false

Position?

8

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ManagementPortalUrl<String>

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

Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

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

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PublishSettingsFileUrl<String>

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.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ResourceManagerEndpoint<String>

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

Aliases

none

Required?

false

Position?

7

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ServiceEndpoint<String>

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.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-StorageEndpoint<String>

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

Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

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

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment

Examples

Example 1: Add an Azure environment

This command creates the ContosoEnv 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 :

Get-AzureEnvironment

Remove-AzureEnvironment

Set-AzureEnvironment