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

Get-AzureStorageKey

microsoft.windowsazure.commands.servicemanagement.dll

Synopsis

Returns the primary and secondary storage account keys for a Microsoft Azure storage account.

Syntax

Get-AzureStorageKey [-StorageAccountName] [<CommonParameters>]

Detailed Description

The Get-AzureStorageKey cmdlet returns an object with the storage account name, the primary account key, and the secondary account key of the specified Microsoft Azure storage account as properties.

Parameters

-StorageAccountName <String>

Specifies the storage account name.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

node-dev, php-dev

Examples

-------------------------- Example 1 --------------------------

This command gets an object with the primary and secondary storage keys for the "mystore1" storage account.

PS C:\> Get-AzureStorageKey –StorageAccountName "mystore1"

-------------------------- Example 2 --------------------------

This command puts the primary storage account key for the "mystore1" storage account in the $myStoreKey variable.

PS C:\> $myStoreKey = (Get-AzureStorageKey –StorageAccountName "mystore1").Primary

Get-AzureStorageAccount
New-AzureStorageAccount
New-AzureStorageKey
Remove-AzureStorageAccount
Set-AzureStorageAccount