Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AzCopy (devops pipeline)is not recognized as the name of a cmdlet, function, script file, or operable program

I have a PowerShell script that works all the time when I use from my local machine (I have azCopy installed):

AzCopy `
/Source:C:\myfolder `
/Dest:https://mystorageaccount.blob.core.windows.net/mystoragecontainer `
/DestKey:<storage-account-access-key> `
/Pattern:"myfile.txt"

Using azure pipeline (Microsoft Hosted agent) this script fails with

"AzCopy.exe : The term 'AzCopy.exe' is not recognized as the name of a cmdlet, function, script file, or operable program."

I have tried different agents but still the same error. Which agent I must use to use azCopy?

Am I missing the obvious?

Is there another way of doing this always using powershell?

like image 806
developer9969 Avatar asked Dec 07 '25 10:12

developer9969


1 Answers

To copy files to Azure with AzCpoy you can use build-in task Azure File Copy, you not need use PowerShell:

enter image description here

In addition, you can install the Microsoft Azure Build and Release Tasks extension that give you another task "Azure Copy File Extended" with more options.

like image 56
Shayki Abramczyk Avatar answered Dec 10 '25 04:12

Shayki Abramczyk