< Back
Start-AzureStorageBlobCopy
Post
NAME Start-AzureStorageBlobCopy
SYNOPSIS
Starts to copy a blob.
SYNTAX
Start-AzureStorageBlobCopy -AbsoluteUri <String> [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>]
-DestBlob <String> -DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] -CloudBlob <CloudBlob> [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>]
[-DestBlob <String>] -DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-PremiumPageBlobTier <PremiumPageBlobTier>]
[-ServerTimeoutPerRequest <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] -CloudBlob <CloudBlob> [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>]
-DestCloudBlob <CloudBlob> [-DestContext <IStorageContext>] [-Force] [-PremiumPageBlobTier <PremiumPageBlobTier>] [-ServerTimeoutPerRequest
<Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-SrcBlob] <String> [-ClientTimeoutPerRequest <Int32>] -CloudBlobContainer <CloudBlobContainer> [-ConcurrentTaskCount
<Int32>] [-Context <IStorageContext>] [-DestBlob <String>] -DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-PremiumPageBlobTier
<PremiumPageBlobTier>] [-ServerTimeoutPerRequest <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-SrcBlob] <String> [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>]
[-DestBlob <String>] -DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-PremiumPageBlobTier <PremiumPageBlobTier>]
[-ServerTimeoutPerRequest <Int32>] -SrcContainer <String> [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] [-DestBlob <String>]
-DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcFilePath <String> -SrcShareName <String>
[-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] [-DestBlob <String>]
-DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcFilePath <String> -SrcShare
<CloudFileShare> [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] [-DestBlob <String>]
-DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcDir <CloudFileDirectory> -SrcFilePath
<String> [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] [-DestBlob <String>]
-DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcFile <CloudFile> [-Confirm] [-WhatIf]
[<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] -DestCloudBlob
<CloudBlob> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcFile <CloudFile> [-Confirm] [-WhatIf]
[<CommonParameters>]
DESCRIPTION
The Start-AzureStorageBlobCopy cmdlet starts to copy a blob.
PARAMETERS
-AbsoluteUri <String>
Specifies the absolute URI of a file to copy to an Azure Storage blob.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ClientTimeoutPerRequest <Int32>
Specifies the client-side time-out interval, in seconds, for one service request. If the previous call fails in the specified interval, this
cmdlet retries the request. If this cmdlet does not receive a successful response before the interval elapses, this cmdlet returns an error.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-CloudBlob <CloudBlob>
Specifies a CloudBlob object from Azure Storage Client library. To obtain a CloudBlob object, use the Get-AzureStorageBlob cmdlet.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-CloudBlobContainer <CloudBlobContainer>
Specifies a CloudBlobContainer object from the Azure Storage Client library. This cmdlet copies a blob from the container that this parameter
specifies. To obtain a CloudBlobContainer object, use the Get-AzureStorageContainer cmdlet.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ConcurrentTaskCount <Int32>
Specifies the maximum concurrent network calls. You can use this parameter to limit the concurrency to throttle local CPU and bandwidth usage
by specifying the maximum number of concurrent network calls. The specified value is an absolute count and is not multiplied by the core
count. This parameter can help reduce network connection problems in low bandwidth environments, such as 100 kilobits per second. The default
value is 10.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Context <IStorageContext>
Specifies an Azure storage context. To obtain a storage context, use the New-AzureStorageContext cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-DestBlob <String>
Specifies the name of the destination blob.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DestCloudBlob <CloudBlob>
Specifies a destination CloudBlob object
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DestContainer <String>
Specifies the name of the destination container.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DestContext <IStorageContext>
Specifies an Azure storage context. To obtain a storage context, use the New-AzureStorageContext cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Indicates that this cmdlet overwrites the destination blob without prompting you for confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-PremiumPageBlobTier <PremiumPageBlobTier>
Premium Page Blob Tier
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ServerTimeoutPerRequest <Int32>
Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the
request, the storage service returns an error.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcBlob <String>
Specifies the name of the source blob.
Required? true
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcContainer <String>
Specifies the name of the source container.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcDir <CloudFileDirectory>
Specifies a CloudFileDirectory object from Azure Storage Client library.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcFile <CloudFile>
Specifes a CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-SrcFilePath <String>
Specifies the source file relative path of source directory or source share.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcShare <CloudFileShare>
Specifies a CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcShareName <String>
Specifies the source share name.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
CloudBlob
Parameter 'CloudBlob' accepts value of type 'CloudBlob' from the pipeline
IStorageContext
Parameter 'Context' accepts value of type 'IStorageContext' from the pipeline
CloudFile
Parameter 'SrcFile' accepts value of type 'CloudFile' from the pipeline
OUTPUTS
Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureStorageBlob
NOTES
Example 1: Copy a named blob
C:\\PS>Start-AzureStorageBlobCopy -SrcBlob "ContosoPlanning2015" -DestContainer "ContosoArchives" -SrcContainer "ContosoUploads"
This command starts the copy operation of the blob named ContosoPlanning2015 from the container named ContosoUploads to the container named
ContosoArchives.
Example 2: Get a container to specify blobs to copy
C:\\PS>Get-AzureStorageContainer -Name "ContosoUploads" | Start-AzureStorageBlobCopy -SrcBlob "ContosoPlanning2015" -DestContainer "ContosoArchives"
This command gets the container named ContosoUploads, by using the Get-AzureStorageContainer cmdlet, and then passes the container to the current
cmdlet by using the pipeline operator. That cmdlet starts the copy operation of the blob named ContosoPlanning2015. The previous cmdlet provides
the source container. The DestContainer parameter specifies ContosoArchives as the destination container.
Example 3: Get all blobs in a container and copy them
C:\\PS>Get-AzureStorageBlob -Container "ContosoUploads" | Start-AzureStorageBlobCopy -DestContainer "ContosoArchives"
This command gets the blobs in the container named ContosoUploads, by using the Get-AzureStorageBlob cmdlet, and then passes the results to the
current cmdlet by using the pipeline operator. That cmdlet starts the copy operation of the blobs to the container named ContosoArchives.
Example 4: Copy a blob specified as an object
C:\\PS>$SrcBlob = Get-AzureStorageBlob -Container "ContosoUploads" -Blob "ContosoPlanning2015"
C:\\PS> $DestBlob = Get-AzureStorageBlob -Container "ContosoArchives" -Blob "ContosoPlanning2015Archived"
C:\\PS> Start-AzureStorageBlobCopy -ICloudBlob $SrcBlob.ICloudBlob -DestICloudBlob $DestBlob.ICloudBlob
The first command gets the blob named ContosoPlanning2015 in the container named ContosoUploads. The command stores that object in the $SrcBlob
variable.
The second command gets the blob named ContosoPlanning2015Archived in the container named ContosoArchives. The command stores that object in the
$DestBlob variable.
The last command starts the copy operation from the source container to the destination container. The command uses standard dot notation to
specify the ICloudBlob objects for the $SrcBlob and $DestBlob blobs.
Example 5: Copy a blob from a URI
C:\\PS>$Context = New-AzureStorageContext -StorageAccountName "ContosoGeneral" -StorageAccountKey "< Storage Key for ContosoGeneral ends with == >"
C:\\PS> Start-AzureStorageBlobCopy -AbsoluteUri "http://www.contosointernal.com/planning" -DestContainer "ContosoArchive" -DestBlob
"ContosoPlanning2015" -DestContext $Context
This command creates a context for the account named ContosoGeneral that uses the specified key, and then stores that key in the $Context variable.
The second command copies the file from the specified URI to the blob named ContosoPlanning in the container named ContosoArchive. The command
starts the copy operation in the context stored in $Context.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... geblobcopy
Get-AzureStorageBlobCopyState
Stop-AzureStorageBlobCopy
SYNOPSIS
Starts to copy a blob.
SYNTAX
Start-AzureStorageBlobCopy -AbsoluteUri <String> [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>]
-DestBlob <String> -DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] -CloudBlob <CloudBlob> [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>]
[-DestBlob <String>] -DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-PremiumPageBlobTier <PremiumPageBlobTier>]
[-ServerTimeoutPerRequest <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] -CloudBlob <CloudBlob> [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>]
-DestCloudBlob <CloudBlob> [-DestContext <IStorageContext>] [-Force] [-PremiumPageBlobTier <PremiumPageBlobTier>] [-ServerTimeoutPerRequest
<Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-SrcBlob] <String> [-ClientTimeoutPerRequest <Int32>] -CloudBlobContainer <CloudBlobContainer> [-ConcurrentTaskCount
<Int32>] [-Context <IStorageContext>] [-DestBlob <String>] -DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-PremiumPageBlobTier
<PremiumPageBlobTier>] [-ServerTimeoutPerRequest <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-SrcBlob] <String> [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>]
[-DestBlob <String>] -DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-PremiumPageBlobTier <PremiumPageBlobTier>]
[-ServerTimeoutPerRequest <Int32>] -SrcContainer <String> [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] [-DestBlob <String>]
-DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcFilePath <String> -SrcShareName <String>
[-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] [-DestBlob <String>]
-DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcFilePath <String> -SrcShare
<CloudFileShare> [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] [-DestBlob <String>]
-DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcDir <CloudFileDirectory> -SrcFilePath
<String> [-Confirm] [-WhatIf] [<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] [-DestBlob <String>]
-DestContainer <String> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcFile <CloudFile> [-Confirm] [-WhatIf]
[<CommonParameters>]
Start-AzureStorageBlobCopy [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] -DestCloudBlob
<CloudBlob> [-DestContext <IStorageContext>] [-Force] [-ServerTimeoutPerRequest <Int32>] -SrcFile <CloudFile> [-Confirm] [-WhatIf]
[<CommonParameters>]
DESCRIPTION
The Start-AzureStorageBlobCopy cmdlet starts to copy a blob.
PARAMETERS
-AbsoluteUri <String>
Specifies the absolute URI of a file to copy to an Azure Storage blob.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ClientTimeoutPerRequest <Int32>
Specifies the client-side time-out interval, in seconds, for one service request. If the previous call fails in the specified interval, this
cmdlet retries the request. If this cmdlet does not receive a successful response before the interval elapses, this cmdlet returns an error.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-CloudBlob <CloudBlob>
Specifies a CloudBlob object from Azure Storage Client library. To obtain a CloudBlob object, use the Get-AzureStorageBlob cmdlet.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-CloudBlobContainer <CloudBlobContainer>
Specifies a CloudBlobContainer object from the Azure Storage Client library. This cmdlet copies a blob from the container that this parameter
specifies. To obtain a CloudBlobContainer object, use the Get-AzureStorageContainer cmdlet.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ConcurrentTaskCount <Int32>
Specifies the maximum concurrent network calls. You can use this parameter to limit the concurrency to throttle local CPU and bandwidth usage
by specifying the maximum number of concurrent network calls. The specified value is an absolute count and is not multiplied by the core
count. This parameter can help reduce network connection problems in low bandwidth environments, such as 100 kilobits per second. The default
value is 10.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Context <IStorageContext>
Specifies an Azure storage context. To obtain a storage context, use the New-AzureStorageContext cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-DestBlob <String>
Specifies the name of the destination blob.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DestCloudBlob <CloudBlob>
Specifies a destination CloudBlob object
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DestContainer <String>
Specifies the name of the destination container.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DestContext <IStorageContext>
Specifies an Azure storage context. To obtain a storage context, use the New-AzureStorageContext cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Indicates that this cmdlet overwrites the destination blob without prompting you for confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-PremiumPageBlobTier <PremiumPageBlobTier>
Premium Page Blob Tier
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ServerTimeoutPerRequest <Int32>
Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the
request, the storage service returns an error.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcBlob <String>
Specifies the name of the source blob.
Required? true
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcContainer <String>
Specifies the name of the source container.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcDir <CloudFileDirectory>
Specifies a CloudFileDirectory object from Azure Storage Client library.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcFile <CloudFile>
Specifes a CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-SrcFilePath <String>
Specifies the source file relative path of source directory or source share.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcShare <CloudFileShare>
Specifies a CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SrcShareName <String>
Specifies the source share name.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
CloudBlob
Parameter 'CloudBlob' accepts value of type 'CloudBlob' from the pipeline
IStorageContext
Parameter 'Context' accepts value of type 'IStorageContext' from the pipeline
CloudFile
Parameter 'SrcFile' accepts value of type 'CloudFile' from the pipeline
OUTPUTS
Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureStorageBlob
NOTES
Example 1: Copy a named blob
C:\\PS>Start-AzureStorageBlobCopy -SrcBlob "ContosoPlanning2015" -DestContainer "ContosoArchives" -SrcContainer "ContosoUploads"
This command starts the copy operation of the blob named ContosoPlanning2015 from the container named ContosoUploads to the container named
ContosoArchives.
Example 2: Get a container to specify blobs to copy
C:\\PS>Get-AzureStorageContainer -Name "ContosoUploads" | Start-AzureStorageBlobCopy -SrcBlob "ContosoPlanning2015" -DestContainer "ContosoArchives"
This command gets the container named ContosoUploads, by using the Get-AzureStorageContainer cmdlet, and then passes the container to the current
cmdlet by using the pipeline operator. That cmdlet starts the copy operation of the blob named ContosoPlanning2015. The previous cmdlet provides
the source container. The DestContainer parameter specifies ContosoArchives as the destination container.
Example 3: Get all blobs in a container and copy them
C:\\PS>Get-AzureStorageBlob -Container "ContosoUploads" | Start-AzureStorageBlobCopy -DestContainer "ContosoArchives"
This command gets the blobs in the container named ContosoUploads, by using the Get-AzureStorageBlob cmdlet, and then passes the results to the
current cmdlet by using the pipeline operator. That cmdlet starts the copy operation of the blobs to the container named ContosoArchives.
Example 4: Copy a blob specified as an object
C:\\PS>$SrcBlob = Get-AzureStorageBlob -Container "ContosoUploads" -Blob "ContosoPlanning2015"
C:\\PS> $DestBlob = Get-AzureStorageBlob -Container "ContosoArchives" -Blob "ContosoPlanning2015Archived"
C:\\PS> Start-AzureStorageBlobCopy -ICloudBlob $SrcBlob.ICloudBlob -DestICloudBlob $DestBlob.ICloudBlob
The first command gets the blob named ContosoPlanning2015 in the container named ContosoUploads. The command stores that object in the $SrcBlob
variable.
The second command gets the blob named ContosoPlanning2015Archived in the container named ContosoArchives. The command stores that object in the
$DestBlob variable.
The last command starts the copy operation from the source container to the destination container. The command uses standard dot notation to
specify the ICloudBlob objects for the $SrcBlob and $DestBlob blobs.
Example 5: Copy a blob from a URI
C:\\PS>$Context = New-AzureStorageContext -StorageAccountName "ContosoGeneral" -StorageAccountKey "< Storage Key for ContosoGeneral ends with == >"
C:\\PS> Start-AzureStorageBlobCopy -AbsoluteUri "http://www.contosointernal.com/planning" -DestContainer "ContosoArchive" -DestBlob
"ContosoPlanning2015" -DestContext $Context
This command creates a context for the account named ContosoGeneral that uses the specified key, and then stores that key in the $Context variable.
The second command copies the file from the specified URI to the blob named ContosoPlanning in the container named ContosoArchive. The command
starts the copy operation in the context stored in $Context.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... geblobcopy
Get-AzureStorageBlobCopyState
Stop-AzureStorageBlobCopy