Azure Devops Powershell Script

I am new to Azure Devops. We have a pipeline and one of the tasks in the pipeline is to copy some config files to another server and it looks like
copy-item -path D:\Config\*.* -Destination '\\server\test\project\files' -r

It was working and there was a service account (username and password) added in variables. For deployment task (another task) it is added and password for that account was changed recently.I have updated the password in the secret variable but the powershell scripts is giving the following
copy-item the user name or password is incorrect. I am not sure which account it is complaining about as there is no credentials set in the script and how to resolve this error.

  • After updating the password. Ensure the same PowerShell script can work fine when you directly execute it on the machine where the agent is hosted.

    – 

Leave a Comment