【发布时间】:2020-01-13 13:52:48
【问题描述】:
PowerShell 版本:5.1
我在 PowerShell 中运行此命令以获取容器中的 blob 列表。
$context = New-AzureStorageContext -StorageAccountName"storageAccountNmae" -StorageAccountKey "Storagekey"
Get-AzureStorageContainer -Context $context
$List = Get-AzureStorageBlob -Context $context -Container "ContainerName" -Blob *
$List | ForEach-Object {Write-Output $_.Name}
并得到以下错误:
Get-AzureStorageContainer : Method not found: 'Void Microsoft.WindowsAzure.Storage.OperationContext.set_StartTime(System.DateTimeOffset)'.
At line:3 char:1
+ Get-AzureStorageContainer -Context $context
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzStorageContainer], StorageException
+ FullyQualifiedErrorId : StorageException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageContainerCommand
Get-AzureStorageBlob : Method not found: 'Void Microsoft.WindowsAzure.Storage.OperationContext.set_StartTime(System.DateTimeOffset)'.
At line:5 char:9
+ $List = Get-AzureStorageBlob -Context $context -Container "dbbackup" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzStorageBlob], StorageException
+ FullyQualifiedErrorId : StorageException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageBlobCommand
【问题讨论】:
-
我无法在我的系统上复制该错误,但 this question 与类似错误有关
标签: powershell azure-storage azure-blob-storage