0
次のコードは昨日までうまくいきましたが、今日は以下のようなエラーが表示されています。新しいコンテキストにStorageAccountキーを渡しているときにエラーが発生しました
$Ctx = New-AzureStorageContext $StorageAccountName -StorageAccountKey $StorageAccountKey.key1
で上記のコードの最後の行を交換しようとしました
$StorageAccountName = "xyz"
$StorageAccountKey = Get-AzureRmStorageAccountKey -StorageAccountName $StorageAccountName
$Ctx = New-AzureStorageContext $StorageAccountName -StorageAccountKey $StorageAccountKey.Primary
ここでエラーです:
New-AzureStorageContext : Cannot validate argument on parameter 'StorageAccountKey'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
これを自分でそれを把握できはたらきましたが、cuから出ました'$ StorageAccountKey.Primary'や' $ StorageAccountKey.key1'を使ってこの問題を知りたがっていました –
まあ、私はあなたに説明しました。 '$ StorageAccountKey'オブジェクトはそれらのプロパティをもはや持たず、あなた自身でチェックすることができます。 gm'と参照してください。 – 4c74356b41