Henrik can I get you to try replicating my issue at your end ?
Create 2 Directories not locally / on a share.
my example is a machine called fbsprod02
Create 2 Directories
C:\CopyFrom
C:\CopyTo
Assign a Domain User associated with a credential with full access to both directories
put a dummy file in C:\CopyFrom.
Screen Shots and Script files attached FYI / to assist with this. I Used C:\Batch as the script path on the VisualCron Server machine.
1) If you run a VisualCron copy task without a credential copying from \\fbsprod02\c$\CopyFrom to \\fbsprod02\c$\CopyTo that should fail - Access Denied
2) If you associate the credential with the above and rerun the Copy Task that should work
The above is the baseline, nothing to do with Powershell.
Create a Process-Powershell command with the following as the text to execute:
<Not Powershell - just a robocopy command - but will serve as a test>
robocopy \\fbsprod02\c$\CopyFrom \\fbsprod02\c$\CopyTo /s /r:0 /w:0 /log:C:\Temp\Robo.txt
3) Run Task without a Credential - Expected to Fail - Access Denied
4) Run Task with a Credential - Expected to Work but for me doesn't - Still Access Denied
Exactly the same command but included in a powershell script called robocopy.ps1
5) Run Task without a Credential - Expected to Fail - Access Denied
6) Run Task with a Credential - Expected to Work but for me doesn't - Still Access Denied
Change the Task Type to Process - Execute and use the provided command wrapper to wrap the exact same powershell script:
7) Run Task without a Credential - Expected to Fail - Access Denied
8) Run Task with a Credential - Expected to Work - Copy Successfull
Just as a cross check we can use the same command as a command to execute
9) Run Robo as a Process Execute command line - Expected to Fail - Access Denied
10) Run Robo as a Process Execute command line - Expected to Work - Copy Successfull
Sorry if this is a little short hand. Please have a look at the attached screen prints / robocopy output and see if this makes sense.
Again I am using Robocopy simply as an easy to replicate and document 1 line example, obviously its not real powershell but serves as an example as I think my issue is credential / security related.
File Attachment(s):
KJDavie attached the following image(s):