-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Doc - ReferenceService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Storagecustomer-reportedquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Description
Start-AzStorageBlobCopy help example 4 states:
-------- Example 4: Copy a blob specified as an object --------
C:\PS>$SrcBlob = Get-AzStorageBlob -Container "ContosoUploads" -Blob "ContosoPlanning2015"
C:\PS> $DestBlob = Get-AzStorageBlob -Container "ContosoArchives" -Blob "ContosoPlanning2015Archived"
C:\PS> Start-AzStorageBlobCopy -ICloudBlob $SrcBlob.ICloudBlob -DestICloudBlob $DestBlob.ICloudBlob
Running Get-AzStorageBlob without -context, and obviously passing in a context, gives an error:
At line:1 char:1
+ Get-AzStorageBlob -Blob "excel.csv" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzStorageBlob], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageBlobCommand```
## Steps to reproduce
```powershell
Get-AzStorageBlob -Blob "Excel.csv" -Container storage
Environment data
Name Value
---- -----
PSVersion 5.1.18362.752
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.752
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.2.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script 2.1.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script 1.13.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script 1.8.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script 1.6.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}Comments:
There's not really much else to say, this is easily reproducable as the example doesn't use the Get-AzStorageBlob cmdlet correctly.
Start-AzStorageBlobCopy doesn't seem to work the way examples 4 & 5 are described, but I will raise a separate issue for those after further testing.
Metadata
Metadata
Assignees
Labels
Doc - ReferenceService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Storagecustomer-reportedquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that