Export (0) Print
Expand All

Get-AzurePublishSettingsFile

Updated: May 12, 2014

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

Get-AzurePublishSettingsFile

Downloads the publish settings file for an Azure subscription.

Syntax

Parameter Set: Default
Get-AzurePublishSettingsFile [[-Environment] <String> ] [[-Realm] <String> ] [[-PassThru]] [ <CommonParameters>]




Detailed Description

The Get-AzurePublishSettingsFile cmdlet downloads a publish settings file (.publishsettings) for a subscription in your account. When the command completes, you can use the Import-PublishSettingsFile cmdlet to make the settings in the file available to Windows PowerShell.

There are two different ways to make your Azure account available to Windows PowerShell. You can use the Add-AzureAccount cmdlet, which uses Azure Active Directory (Azure AD) authentication access tokens, or Import-AzurePublishSettingsFile, which uses a management certificate. For guidance on which method to use, see "How to: Connect to your subscription" (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/#Connect).

When you run Get-AzurePublishSettingsFile, it opens your default browser and prompts you to sign into your Azure account, select a subscription, and select a file system location for the publish settings file. Then, it downloads the publish settings file for your subscription into the file that you selected.

A "publish settings file" is an XML file with a .publishsettings file name extension. The file contains an encoded management certificate that provides management credentials for your Azure subscriptions.

Security Note: Publish settings files contains credentials that are encoded, but not encrypted. These credentials can be used to sign into your Azure account. As a security best practice, delete this file after using Import-AzurePublishSettingsFile cmdlet to import the settings.

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

-Environment<String>

Gets the publish settings file for the specified Azure environment. This parameter is optional. The default is the AzureCloud environment.

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.

To get the available Azure environments, use the Get-AzureEnvironment cmdlet. To add an environment, use the Add-AzureEnvironment cmdlet.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PassThru

Returns True ($true) if the operation succeeds and False ($false) if it fails. By default, this cmdlet does not return any output.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Realm<String>

Specifies the organization in an organizational ID. For example, if you sign into Azure as admin@contoso.com, the value of the Realm parameter is contoso.com. Use this parameter when you use an organizational ID to sign into the Azure portal. This parameter is not required when you use a Microsoft account, such as an outlook.com or live.com account.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (http://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.

  • None

    This cmdlet does not return any output


Examples

Example 1: Download a publishsettings file

This command opens your default browser, connects to your Azure account, and then downloads the .publishsettings file for your account.


PS C:\> Get-AzurePublishSettingsFile

Example 2: Specify a realm and environment

This command downloads the publish settings file for an AzureChinaCloud account in the contoso.com domain. Use a command with the Realm parameter when you sign into Azure with an organizational account, instead of a Microsoft account.


PS C:\> Get-AzurePublishSettingsFile -Realm contoso.com -Environment AzureChinaCloud

Related topics

Show:
© 2015 Microsoft