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
 

Get-AzureEnvironment

Get-AzureEnvironment

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

Synopsis

Gets Azure environments

Syntax

Get-AzureEnvironment [-Name] [-SubscriptionDataFile] [<CommonParameters>]

Detailed Description

The Get-AzureEnvironment cmdlet gets the Azure environments that are available to 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).The Get-AzureEnvironment cmdlet gets environments from your subscription data file, not from Azure. If the subscription data file is outdated, run the Add-AzureAccount or Import-PublishSettingsFile cmdlet to refresh it.This topic describes the cmdlet in the 0.8.8 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>

Gets only the specified environment. Type the environment name. The parameter value is case-sensitive. Wildcard characters are not permitted.

Aliases

None

Required?

false

Position

0

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

System.Management.Automation.PSCustomObject

Notes

Examples

-------------------------- Example 1: Get all environments --------------------------

This command gets all environments that are available to Windows PowerShell.

PS C:\>Get-AzureEnvironment
EnvironmentName               ServiceEndpoint               ResourceManagerEndpoint       PublishSettingsFileUrl
---------------               ---------------               -----------------------       ----------------------

AzureCloud                    https://management.core.wi... https://management.azure.com/ http://go.microsoft.com/fw... 
AzureChinaCloud               https://management.core.ch... https://not-supported-serv... http://go.microsoft.com/fw...

-------------------------- Example 2: Get an environment by name --------------------------

This example gets the AzureCloud environment.

PS C:\>Get-AzureEnvironment -Name AzureCloud
Name                          : AzureCloud

PublishSettingsFileUrl        : http://go.microsoft.com/fwlink/?LinkID=301775

ServiceEndpoint               : https://management.core.windows.net/

ResourceManagerEndpoint       : https://management.azure.com/

ManagementPortalUrl           : http://go.microsoft.com/fwlink/?LinkId=254433

ActiveDirectoryEndpoint       : https://login.windows.net/

ActiveDirectoryCommonTenantId : common

StorageEndpointSuffix         : core.windows.net

StorageBlobEndpointFormat     : {0}://{1}.blob.core.windows.net/

StorageQueueEndpointFormat    : {0}://{1}.queue.core.windows.net/

StorageTableEndpointFormat    : {0}://{1}.table.core.windows.net/

GalleryEndpoint               : https://gallery.azure.com/

-------------------------- Example 3: Get all properties of all environments --------------------------

This command gets all properties of all environments.

PS C:\>Get-AzureEnvironment | ForEach-Object {Get-AzureEnvironment -Name $_.EnvironmentName}

Online Version
Add-AzureAccount
Add-AzureEnvironment
Get-AzurePublishSettingsFile
Import-AzurePublishSettingsFile
Remove-AzureEnvironment
Set-AzureEnvironment