SALES: 1-800-867-1380

Get-AzureAccount

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-AzureAccount

Gets Azure accounts that are available to Azure PowerShell.

Syntax

Parameter Set: Default
Get-AzureAccount [[-Name] <String> ] [-SubscriptionDataFile <String> ] [ <CommonParameters>]




Detailed Description

The Get-AzureAccount cmdlet gets the Azure accounts that are available to Windows PowerShell. To make your accounts available to Windows PowerShell, run the Add-AzureAccount or Import-PublishSettingsFile cmdlets.

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 cmdlets to refresh it.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

-Name<String>

Gets only the specified account. Type the account name. The Name value is case-sensitive. Wildcards are not permitted. The default is all accounts that are available to Windows PowerShell.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SubscriptionDataFile<String>

Specifies the path and filename of an alternate subscription data file. This parameter is optional. By default, Get-AzureAccount gets account and subscription information from the default subscription data file in your roaming user profile. Use this parameter if you used the SubscriptionDataFile parameter in Add-AzureAccount or Import-AzurePublishSettingsFile to specify an alternate (non-default) file.


Aliases

none

Required?

false

Position?

named

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 (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 cannot pipe input to this cmdlet


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: Get all accounts

This command gets all accounts associated with the specified user.


PS C:\> Get-AzureAccount
Name                         ActiveDirectories
---- -----------------
contosoadmin@outlook.com {{ ActiveDirectoryTenantId = abcde5cd-bcc3-441a-bd86-e6a...
contosotest1@outlook.com {{ ActiveDirectoryTenantId = aaeabcde-386c-4466-bf70-794...

Example 2: Get an account by name

This command gets the ContosoAdmin account.


PS C:\> Get-AzureAccount -Name contosoadmin@outlook.com
Name                         ActiveDirectories
---- -----------------
contosoadmin@outlook.com {{ ActiveDirectoryTenantId = abcde5cd-bcc3-441a-bd86-e6a...

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft