PowerShell Version:5.1
I am running this command in PowerShell to get a list of blobs in a container.
$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}
And getting following error:
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