Start-AzStorageFileCopy
Starts to copy a source file.
Syntax
ContainerName
Start-AzStorageFileCopy
-SrcBlobName <String>
-SrcContainerName <String>
-DestShareName <String>
-DestFilePath <String>
[-Context <IStorageContext>]
[-DestContext <IStorageContext>]
[-DisAllowDestTrailingDot]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ContainerInstance
Start-AzStorageFileCopy
-SrcBlobName <String>
-SrcContainer <CloudBlobContainer>
-DestShareName <String>
-DestFilePath <String>
[-DestContext <IStorageContext>]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
BlobInstanceFilePath
Start-AzStorageFileCopy
-SrcBlob <CloudBlob>
-DestShareName <String>
-DestFilePath <String>
[-DestContext <IStorageContext>]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
BlobInstanceFileInstance
Start-AzStorageFileCopy
-SrcBlob <CloudBlob>
[-DestShareFileClient <ShareFileClient>]
[-DestContext <IStorageContext>]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ShareName
Start-AzStorageFileCopy
-SrcFilePath <String>
-SrcShareName <String>
-DestShareName <String>
-DestFilePath <String>
[-Context <IStorageContext>]
[-DestContext <IStorageContext>]
[-DisAllowSourceTrailingDot]
[-DisAllowDestTrailingDot]
[-FileMode <String>]
[-Owner <String>]
[-Group <String>]
[-OwnerCopyMode <String>]
[-FileModeCopyMode <String>]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ShareInstance
Start-AzStorageFileCopy
-SrcFilePath <String>
-SrcShare <ShareClient>
-DestShareName <String>
-DestFilePath <String>
[-DestContext <IStorageContext>]
[-FileMode <String>]
[-Owner <String>]
[-Group <String>]
[-OwnerCopyMode <String>]
[-FileModeCopyMode <String>]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
FileInstanceToFilePath
Start-AzStorageFileCopy
-SrcFile <ShareFileClient>
-DestShareName <String>
-DestFilePath <String>
[-DestContext <IStorageContext>]
[-FileMode <String>]
[-Owner <String>]
[-Group <String>]
[-OwnerCopyMode <String>]
[-FileModeCopyMode <String>]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
FileInstanceToFileInstance
Start-AzStorageFileCopy
-SrcFile <ShareFileClient>
[-DestShareFileClient <ShareFileClient>]
[-DestContext <IStorageContext>]
[-FileMode <String>]
[-Owner <String>]
[-Group <String>]
[-OwnerCopyMode <String>]
[-FileModeCopyMode <String>]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UriToFilePath
Start-AzStorageFileCopy
-AbsoluteUri <String>
-DestShareName <String>
-DestFilePath <String>
[-DestContext <IStorageContext>]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UriToFileInstance
Start-AzStorageFileCopy
-AbsoluteUri <String>
[-DestShareFileClient <ShareFileClient>]
[-DestContext <IStorageContext>]
[-Force]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Start-AzStorageFileCopy cmdlet starts to copy a source file to a destination file.
This cmdlet will trigger asynchronous blob copy, the copy process is handled by server. If this is a cross account blob copy, there is no SLA for the blob copy.
Examples
Example 1: Start copy operation from file to file by using share name and file name
Start-AzStorageFileCopy -SrcShareName "ContosoShare01" -SrcFilePath "FilePath01" -DestShareName "ContosoShare02" -DestFilePath "FilePath02"
This command starts a copy operation from file to file.
The command specifies share name and file name
Example 2: Start copy operation from blob to file by using container name and blob name
Start-AzStorageFileCopy -SrcContainerName "ContosoContainer01" -SrcBlobName "ContosoBlob01" -DestShareName "ContosoShare" -DestFilePath "FilePath02"
This command starts a copy operation from blob to file.
The command specifies container name and blob name
Example 3: Start copy operation from file to file with specific FileMode, Owner, Group on destination file
Start-AzStorageFileCopy -SrcShareName "contososhare01" -SrcFilePath "FilePath01" -DestShareName "contososhare02" -DestFilePath "FilePath02" -FileMode rw-rwx-wT -Owner 1 -Group 1 -FileModeCopyMode Override -OwnerCopyMode Override
This command starts a copy operation from file to file, with specific FileMode, Owner, Group on destination file.
If the destination file should have same FileMode, Owner, Group as source file, specify "-FileModeCopyMode Source" and "-OwnerCopyMode Source", the parameters FileMode, Owner, Group should not be specified.
If all the parameters FileModeCopyMode, OwnerCopyMode, FileMode, Owner, Group are not specified, the destination file will have the default FileMode, Owner, Group.
FileMode, Owner, Group only works on NFS file share.
Parameters
-AbsoluteUri
Specifies the URI of the source file.
If the source location requires a credential, you must provide one.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UriToFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
UriToFileInstance
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ClientTimeoutPerRequest
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.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ClientTimeoutPerRequestInSeconds
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ConcurrentTaskCount
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.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Context
Specifies an Azure Storage context.
To obtain a context, use the New-AzStorageContext cmdlet.
Parameter properties
Type: IStorageContext
Default value: None
Supports wildcards: False
DontShow: False
Aliases: SrcContext
Parameter sets
ContainerName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ShareName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DestContext
Specifies the Azure Storage context of the destination.
To obtain a context, use New-AzStorageContext .
Parameter properties
Type: IStorageContext
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DestFilePath
Specifies the path of the destination file relative to the destination share.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ContainerName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ContainerInstance
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
BlobInstanceFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareInstance
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
UriToFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DestShareFileClient
ShareFileClient object indicated the Dest file.
Parameter properties
Type: ShareFileClient
Default value: None
Supports wildcards: False
DontShow: False
Aliases: DestFile
Parameter sets
BlobInstanceFileInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFileInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
UriToFileInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DestShareName
Specifies the name of the destination share.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ContainerName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ContainerInstance
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
BlobInstanceFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareInstance
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
UriToFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DisAllowDestTrailingDot
Disallow trailing dot (.) to suffix destination directory and destination file names.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ContainerName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DisAllowSourceTrailingDot
Disallow trailing dot (.) to suffix source directory and source file names.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ShareName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileMode
The mode permissions to be set on the destination file. Only applicable to NFS Files. Only work together with parameter -FileModeCopyMode Override
. Symbolic (rwxrw-rw-) is supported.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ShareName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFilePath
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFileInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileModeCopyMode
Only applicable to NFS Files. The value "Override" need to be specified together with parameter -FileMode
. If not specified, the destination file will have the default File Mode.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ShareName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFilePath
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFileInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Group
The owner group identifier (GID) to be set on the destination file. Only applicable to NFS Files. Need specify together with parameter -OwnerCopyMode Override
.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ShareName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFilePath
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFileInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Owner
The owner user identifier (UID) to be set on the destination file. Only applicable to NFS Files. Need specify together with parameter -OwnerCopyMode Override
.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ShareName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFilePath
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFileInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-OwnerCopyMode
Only applicable to NFS Files. The value "Override" need to be specified together with parameter -Owner
and -Group
. If not specified, the destination file will have the default Owner and Group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ShareName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFilePath
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
FileInstanceToFileInstance
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ServerTimeoutPerRequest
Specifies the length of the time-out period for the server part of a request.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ServerTimeoutPerRequestInSeconds
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SrcBlob
Specifies a CloudBlob object.
You can create a cloud blob or obtain one by using the Get-AzStorageBlob cmdlet.
Parameter properties
Type: CloudBlob
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ICloudBlob
Parameter sets
BlobInstanceFilePath
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
BlobInstanceFileInstance
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-SrcBlobName
Specifies the name of the source blob.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ContainerName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ContainerInstance
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SrcContainer
Specifies a cloud blob container object.
You can create cloud blob container object or use the Get-AzStorageContainer cmdlet.
Parameter properties
Parameter sets
ContainerInstance
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SrcContainerName
Specifies the name of the source container.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ContainerName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SrcFile
Specifies a ShareFileClient object.
You can create a ShareFileClient or obtain one by using Get-AzStorageFile .
Parameter properties
Type: ShareFileClient
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ShareFileClient
Parameter sets
FileInstanceToFilePath
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
FileInstanceToFileInstance
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-SrcFilePath
Specifies the path of the source file relative to the source directory or source share.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ShareName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ShareInstance
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SrcShare
Specifies a cloud file share object.
You can create a cloud file share or obtain one by using the Get-AzStorageShare cmdlet.
Parameter properties
Type: ShareClient
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ShareClient
Parameter sets
ShareInstance
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SrcShareName
Specifies the name of the source share.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ShareName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs