< Back
Add-AzureEnvironment
Post
NAME Add-AzureEnvironment
SYNOPSIS
Creates an Azure environment
SYNTAX
Add-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>] [-Profile <AzureProfile>] [<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/en-us/server-c ... fault.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.
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.
Required? true
Position? 0
Default value
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.
Required? false
Position? 1
Default value
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.
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ManagementPortalUrl <String>
Specifies the URL of the Azure Management Portal in the new environment.
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-StorageEndpoint <String>
Specifies the default endpoint of storage services in the new environment.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ActiveDirectoryEndpoint <String>
Specifies the endpoint for Azure Active Directory authentication in the new environment.
Required? false
Position? 5
Default value
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).
Required? false
Position? 6
Default value
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.
Required? false
Position? 7
Default value
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.
Required? false
Position? 8
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-GraphEndpoint <String>
Changes the endpoint for Azure Active Directory Graph API to the specified value.
Required? false
Position? 9
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-AzureKeyVaultDnsSuffix <String>
The DNS suffix for Azure KeyVaut; servers in this environment
Required? false
Position? 10
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-AzureKeyVaultServiceEndpointResourceId <String>
The identity of the KeyVault endpoint, used to acquire a token for authenticating with the KeyValue service.
Required? false
Position? 11
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureProfile>
The Profile to add the environment to to. If not specified, adds the environment to the default (on disk) profile.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SubscriptionDataFile <string>
[Deprecated]: The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See
https://github.com/Azure/azure-powershe ... re-Profile for a description of the upcoming mechanism for providing
alternate sources of subscription information. Specifies the path to a profile file. This parameter is optional. If it is not provided, default file
in the user's profile is used.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment
NOTES
Keywords: azure, azuresm, servicemanagement, management, service, profile, common, login, account
-------------------------- 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.
-------------------------- Example 2: Add an Azure environment with Parameters --------------------------
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"
This command creates the ContosoEnv Azure environment with PublishSettingsFileUrl, ServiceEndpoint, ResourceManagerEndpoint, and GraphEndpoint
specified. All other endpoints are ignored.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=397619
Get-AzureEnvironment
Remove-AzureEnvironment
Set-AzureEnvironment
SYNOPSIS
Creates an Azure environment
SYNTAX
Add-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>] [-Profile <AzureProfile>] [<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/en-us/server-c ... fault.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.
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.
Required? true
Position? 0
Default value
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.
Required? false
Position? 1
Default value
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.
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ManagementPortalUrl <String>
Specifies the URL of the Azure Management Portal in the new environment.
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-StorageEndpoint <String>
Specifies the default endpoint of storage services in the new environment.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ActiveDirectoryEndpoint <String>
Specifies the endpoint for Azure Active Directory authentication in the new environment.
Required? false
Position? 5
Default value
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).
Required? false
Position? 6
Default value
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.
Required? false
Position? 7
Default value
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.
Required? false
Position? 8
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-GraphEndpoint <String>
Changes the endpoint for Azure Active Directory Graph API to the specified value.
Required? false
Position? 9
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-AzureKeyVaultDnsSuffix <String>
The DNS suffix for Azure KeyVaut; servers in this environment
Required? false
Position? 10
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-AzureKeyVaultServiceEndpointResourceId <String>
The identity of the KeyVault endpoint, used to acquire a token for authenticating with the KeyValue service.
Required? false
Position? 11
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureProfile>
The Profile to add the environment to to. If not specified, adds the environment to the default (on disk) profile.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SubscriptionDataFile <string>
[Deprecated]: The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See
https://github.com/Azure/azure-powershe ... re-Profile for a description of the upcoming mechanism for providing
alternate sources of subscription information. Specifies the path to a profile file. This parameter is optional. If it is not provided, default file
in the user's profile is used.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment
NOTES
Keywords: azure, azuresm, servicemanagement, management, service, profile, common, login, account
-------------------------- 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.
-------------------------- Example 2: Add an Azure environment with Parameters --------------------------
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"
This command creates the ContosoEnv Azure environment with PublishSettingsFileUrl, ServiceEndpoint, ResourceManagerEndpoint, and GraphEndpoint
specified. All other endpoints are ignored.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=397619
Get-AzureEnvironment
Remove-AzureEnvironment
Set-AzureEnvironment