Release step fails due "Access is denied"

Hello guys,

I am trying to copy some files from Server A to Server B using a simple PowerShell command. The servers are not in the AD domain.

`Copy-Item -Path "\\ServerA\d$\work\" -Destination D:\work\ -Force -PassThru`

I already tried the -credential, but it doesn’t work too. Same “Access Denied” error.

Any idea to copy files between non-domain servers?


Sorry to see you are hitting this issue.

I can see from your snippet it should be full UNC paths also single quote marks should be added for the destination folder if I’m not mistaken:

-Destination ‘D:\work\’

There are a few ways around this I will attach a few links for you to view that should do the trick:

Also could you please check you have permissions for the folder you are trying to copy across this has happened from time to time for people without the correct permissions to access the folder:

I hope this helps.

Kind regards,

Hi Ziaul,

Thank you for your help. Unfortunately, these workaround didn’t work. Since my environment doesn’t have Active Directory, there are only local users on the servers. I was wondering if Octopus service account couldn’t have such permission to copy and paste between servers.

Thank you
Ney Santos


The way Octopus is configured it will run Powershell scripts from your host machine with privileges that the user account logged on has.

I suggest using regular network share on server B with write-only access to everyone and call (from Server A), so you can pass the files over to the machine.

This would be your best bet, given the circumstances you are in.

Sorry I could not bring you better news.

Kind regards,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.