From 28047f52f6abd56e89019ba8f5954dea0786f909 Mon Sep 17 00:00:00 2001 From: "Wei Wei (AZURE)" Date: Wed, 24 Aug 2022 13:50:45 +0800 Subject: [PATCH] [Storage] Revise Get-AzStorageAccount help example #2 --- .../help/Get-AzStorageAccountKey.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md b/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md index 1cfbcb6d594b..8fc654b9f82e 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md @@ -33,11 +33,17 @@ This command gets the keys for the specified Azure Storage account. ### Example 2: Get a specific access key for a Storage account ``` -This command gets a specific key for a Storage account. This command works for Azure PowerShell version 1.4, and later versions. +This command gets a specific key for a Storage account. PS C:\>(Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccount")| Where-Object {$_.KeyName -eq "key1"} -This command gets a specific key for a Storage account. This command works for Azure PowerShell version 1.3.2, and previous versions. -PS C:\>(Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccount").Key1 +KeyName Value Permissions CreationTime +------- ----- ----------- ------------ +key1 Full + +This command gets a specific key value for a Storage account. +PS C:\>(Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccount")[0].Value + + ``` ### Example 3: Lists the access keys for a Storage account, include the Kerberos keys (if active directory enabled)