Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Add-AzureEnvironment

Add-AzureEnvironment

microsoft.windowsazure.commands.profile.dll, microsoft.windowsazure.commands.dll

Synopsis

Creates an Azure environment

Syntax

Add-AzureEnvironment [-Name] [-PublishSettingsFileUrl] [-ServiceEndpoint] [-ManagementPortalUrl] [-StorageEndpoint] [-ActiveDirectoryEndpoint] [-ResourceManagerEndpoint] [-GalleryEndpoint] [-ActiveDirectoryServiceEndpointResourceId] [-GraphEndpoint] [-SubscriptionDataFile] [<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 (http://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.9 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

-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

0

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

1

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

2

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

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

4

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ActiveDirectoryEndpoint <String>

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

Aliases

None

Required?

false

Position

5

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

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

7

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ActiveDirectoryServiceEndpointResourceId <String>

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

Aliases

None

Required?

false

Position

8

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-GraphEndpoint <String>

Changes the endpoint for Azure Active Directory Graph API to the specified value.

Aliases

None

Required?

false

Position

9

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-SubscriptionDataFile <String>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

None

Return Type

Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment

Notes

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               :

-------------------------- Example 2: Add an Azure environment with Parameters --------------------------

This command creates the ContosoEnv Azure environment with PublishSettingsFileUrl, ServiceEndpoint, ResourceManagerEndpoint, and GraphEndpoint specified. All other endpoints are ignored.

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

Online Version
Get-AzureEnvironment
Remove-AzureEnvironment
Set-AzureEnvironment