Compartilhar via


WindowsMachineFileCopy@2 - Windows machine file copy v2 task

Use this task to copy files to remote Windows machines.

Inputs

SourcePath - Source
string. Required.

The path to the files to copy. Specifies the absolute path of the source folder or file on the local machine or a UNC Share, like c:\fabrikamfiber or \\fabrikamshare\fabrikamfiber. You can use predefined system variables, such as $(Build.Repository.LocalPath) (the working folder on the agent computer), which makes it easy to specify the location of the build artifacts on the computer that hosts the automation agent.


MachineNames - Machines
string.

Specifies a comma-separated list of machine IP addresses or FQDNs, optionally including the port number. For example: dbserver.fabrikam.com, dbserver_int.fabrikam.com:5986, 192.168.12.34. You can also specify the output variable of other tasks, for example $(variableName), or you can use the name of an Azure Resource Group.


AdminUserName - Admin Login
string.

Specifies the username of a domain or a local administrative account on the target host(s). Formats such as domain\username, username, and machine-name\username are supported. UPN formats, such as username@domain.com, and built-in system accounts, such as NT Authority\System, are not supported.


AdminPassword - Password
string.

Specifies the password for the administrator login for the target machines. Variables defined in build or release pipelines, such as $(passwordVariable), are accepted. You can mark the variable as secret to secure it.


TargetPath - Destination Folder
string. Required.

Specifies the local path on the target machines or an accessible UNC path for copying the files from the source, like d:\fabrikam or \\fabrikam\Web.


CleanTargetBeforeCopy - Clean Target
boolean. Default value: false.

Deletes all files in the target folder before copying the new files to it.


CopyFilesInParallel - Copy Files in Parallel
boolean. Default value: true.

Copies files to all target machines in parallel, which can speed up the copying process.


AdditionalArguments - Additional Arguments
string.

Specifies additional RoboCopy arguments that are applied when copying files, like /min:33553332 /l.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Use this task to copy application files and other artifacts, such as PowerShell scripts and PowerShell-DSC modules, which are required to install the application on Windows machines. It uses RoboCopy, the command-line utility built for fast copying of data.

Why do I get a system error 53 when using this task?

Typically this occurs when the specified path cannot be located. This may be due to a firewall blocking the necessary ports for file and printer sharing or an invalid path specification. For more details, see Error 53 on TechNet.

What's new in Version 2.0

  • Proxy support is being added.
  • Removed support of legacy DTL machines.

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 1.104.0 or greater
Task category Deploy