Skip to content

Commit 60ae464

Browse files
authored
Merge pull request #94963 from sjwaight/patch-10
Update the Storage Key PowerShell command
2 parents eaf1111 + 79ac8da commit 60ae464

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)