Get storage keys using PowerShell with AzureRM

Get storage keys using PowerShell with AzureRM

Q. How can I get Azure Storage Account keys using PowerShell with Azure Resource Manager?

A. In article http://windowsitpro.com/azure/use-powershell-obtain-azure-storage-account-key I covered getting storage account keys using PowerShell with Azure Service Manager accounts. For Azure Resource Manager the PowerShell is the following:

$storAccount = 'storaccount'
$rgName = 'resgroup'
$storKey = (Get-AzureRmStorageAccountKey -Name $storAccount -ResourceGroupName $rgName ).Key1

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish