Azure pipeline copy files from Azure repo to remote WIndows machine

Phuc Mai 136 Reputation points
2021-04-27T12:41:36.32+00:00

Hi everyone,

I'm learning to write an Azure DevOps pipeline. Just a simple task to copy files from an Azure repo to a remote Windows machine.

 trigger:
    - main
    stages:
      - stage: Deploying
        jobs:
          - job:  Deploying
            displayName: Copying files to test machine
            steps:
             - task: WindowsMachineFileCopy@2
               inputs:
                  SourcePath: '<one of the current project's repos>'
                  MachineNames: '192.168.***.***'
                  AdminUserName: '<admin>'
                  AdminPassword: '$(Password)'
                  TargetPath: 'c:\Folder\'

The pipeline failed with [error]The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.
Copying files through SSH would be a solution as well, but I would love to avoid having to setup all the keys and stuff, especially if later I need to work on multiple target machines.
Would be grateful for any suggestions from you. Thanks.

Community Center Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. tbgangav-MSFT 10,426 Reputation points Moderator
    2021-04-27T13:24:29.757+00:00

    Hi @Phuc Mai ,

    Azure DevOps is currently not supported in this Microsoft Q&A platform. You may ask Azure DevOps related questions in this developer community.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.