Quickly see all storage keys for Azure Storage accounts
List all storage keys for Azure storage accounts.
John Savill
September 10, 2015
1 Min Read
Q. How can I quickly see the primary key to access all storage accounts I have access to?
A. I recently wanted to setup a graphical tool to view all my storage accounts which requires knowing the storage account name and storage key. This information can be found in the Azure portal however I hada lot of storage accounts so the PowerShell below quickly shows all the storage accounts and their respective keys. Please be careful with the output and do not share as anyone with this information can access your storage accounts.
#Get key of storage account$storaccounts=Get-AzureStorageAccountforeach($storaccount in $storaccounts){ $Key=Get-AzureStorageKey $storaccount.Label $outputtext = $storaccount.Label + "`t" + $key.Primary write-output $outputtext}
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like