Skip to content

Latest commit

 

History

History
244 lines (193 loc) · 7.96 KB

windows-machine-file-copy-v1.md

File metadata and controls

244 lines (193 loc) · 7.96 KB
title description ms.date monikerRange
WindowsMachineFileCopy@1 - Windows machine file copy v1 task
Copy files to remote Windows machines (task version 1).
06/11/2024
<=azure-pipelines

WindowsMachineFileCopy@1 - Windows machine file copy v1 task

:::moniker range="<=azure-pipelines"

Use this task to copy files to remote Windows machines.

:::moniker-end

Syntax

:::moniker range=">=azure-pipelines-2019.1"

# Windows machine file copy v1
# Copy files to remote Windows machines.
- task: WindowsMachineFileCopy@1
  inputs:
    SourcePath: # string. Required. Source. 
    #EnvironmentName: # string. Machines. 
    #AdminUserName: # string. Admin Login. 
    #AdminPassword: # string. Password. 
    TargetPath: # string. Required. Destination Folder. 
  # Advanced Options
    #CleanTargetBeforeCopy: false # boolean. Clean Target. Default: false.
    #CopyFilesInParallel: true # boolean. Copy Files in Parallel. Default: true.
    #AdditionalArguments: # string. Additional Arguments. 
    #ResourceFilteringMethod: 'machineNames' # 'machineNames' | 'tags'. Select Machines By. Default: machineNames.
    #MachineNames: # string. Filter Criteria.

:::moniker-end

:::moniker range="=azure-pipelines-2019"

# Windows Machine File Copy v1
# Copy files to remote machine(s).
- task: WindowsMachineFileCopy@1
  inputs:
    SourcePath: # string. Required. Source. 
    #EnvironmentName: # string. Machines. 
    #AdminUserName: # string. Admin Login. 
    #AdminPassword: # string. Password. 
    TargetPath: # string. Required. Destination Folder. 
  # Advanced Options
    #CleanTargetBeforeCopy: false # boolean. Clean Target. Default: false.
    #CopyFilesInParallel: true # boolean. Copy Files in Parallel. Default: true.
    #AdditionalArguments: # string. Additional Arguments. 
    #ResourceFilteringMethod: 'machineNames' # 'machineNames' | 'tags'. Select Machines By. Default: machineNames.
    #MachineNames: # string. Filter Criteria.

:::moniker-end

Inputs

:::moniker range="<=azure-pipelines"

SourcePath - Source
string. Required.

Specifies the absolute path of the source folder or file on the local machine or a UNC Share, like c:\fabrikamfiber or \\fabrikamshare\fabrikamfiber.


:::moniker-end

:::moniker range="<=azure-pipelines"

EnvironmentName - Machines
string.

Specifies a comma-separated list of machine IP addresses or FQDNs, for example, dbserver.fabrikam.com,192.168.12.34. You can also specify the output variable of other tasks, for example $(variableName).


:::moniker-end

:::moniker range="<=azure-pipelines"

AdminUserName - Admin Login
string.

Specifies the administrator login for the target machines.


:::moniker-end

:::moniker range="<=azure-pipelines"

AdminPassword - Password
string.

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


:::moniker-end

:::moniker range="<=azure-pipelines"

TargetPath - Destination Folder
string. Required.

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


:::moniker-end

:::moniker range="<=azure-pipelines"

CleanTargetBeforeCopy - Clean Target
boolean. Default value: false.

Cleans the destination folder before copying the files.


:::moniker-end

:::moniker range="<=azure-pipelines"

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

Copies files in parallel to the machines.


:::moniker-end

:::moniker range="<=azure-pipelines"

AdditionalArguments - Additional Arguments
string.

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


:::moniker-end

:::moniker range="<=azure-pipelines"

ResourceFilteringMethod - Select Machines By
string. Allowed values: machineNames (Machine Names), tags. Default value: machineNames.


:::moniker-end

:::moniker range="<=azure-pipelines"

MachineNames - Filter Criteria
string.

This input is only valid for machine groups and is not supported for a flat list of machines or output variables yet.

Specifies a comma-separated list of machines, like dbserver.fabrikam.com, webserver.fabrikam.com, 192.168.12.34, or tags, like Role:DB; OS:Win8.1. If multiple tags are provided, the task will run in all machines with the specified tags. The default runs the task in all machines.


:::moniker-end

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

:::moniker range="<=azure-pipelines"

None.

:::moniker-end

Requirements

:::moniker range=">=azure-pipelines-2019"

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

:::moniker-end