Skip to content

Commit 79ac8da

Browse files
authored
Update the Storage Key PowerShell command
As per the documentation for Get-AzStorageAccountKey I have update the command to use Azure PowerShell version 1.4 (or later) versions as this is the default installed on Azure Cloud Shell.
1 parent 8ab5e6e commit 79ac8da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/event-grid/storage-upload-process-images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ The *images* container's public access is set to `off`. The *thumbnails* contain
113113
Get the storage account key by using the [Get-AzStorageAccountKey](/powershell/module/az.storage/get-azstorageaccountkey) command. Then, use this key to create two containers with the [New-AzStorageContainer](/powershell/module/az.storage/new-azstoragecontainer) command.
114114

115115
```powershell
116-
$blobStorageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName myResourceGroup -Name $blobStorageAccount).Key1
116+
$blobStorageAccountKey = ((Get-AzStorageAccountKey -ResourceGroupName myResourceGroup -Name $blobStorageAccount)| Where-Object {$_.KeyName -eq "key1"}).Value
117117
$blobStorageContext = New-AzStorageContext -StorageAccountName $blobStorageAccount -StorageAccountKey $blobStorageAccountKey
118118
119119
New-AzStorageContainer -Name images -Context $blobStorageContext

0 commit comments

Comments
 (0)