I am trying to copy a file from local server to remote shared location by using the below command -
Copy-Item -Path E:\praghav\latest_log.txt -Destination \\CPO-PRD-04\Shared_Directory\Cognos_Logs_DEV\latest_log.txt
Error - Copy-Item : Access to the path '\\CPO-PRD-04\Shared_Directory\Cognos_Logs_DEV\latest_log.txt' is denied.At C:\Windows\Temp\PO_WorkingDir_d3387d74-c99c-4f00-9008-a4a4adaa9f82\PO_PSScript_d3387d74-c99c-4f00-9008-a4a4adaa9f82.ps1:1 char:10+ Copy-Item <<<< -Path E:\praghav\latest_log.txt -Destination \\CPO-PRD-04\Shared_Directory\Cognos_Logs_DEV\latest_log.txt + CategoryInfo : PermissionDenied: (E:\praghav\latest_log.txt:Fil eInfo) [Copy-Item], UnauthorizedAccessException + FullyQualifiedErrorId : CopyFileInfoItemUnauthorizedAccessError,Microsof t.PowerShell.Commands.CopyItemCommand
Directory already has full access. The command is working fine when i am using it in powershell command prompt.
But it's not working fine in CPO Process.
Who has full access to it? anyone? Both read/write?
Can you tried standard "copy" from a windows execute function?
Yes. Anyone can access it.
I am able to copy the file by using the same command via powershell command prompt but it's not working when i am using CPO activity.
Is the PowerShell activity configured to run on the local PO server machine or a remote machine?
Did you check the "Select this checkbox if this activity uses remote resources" ? I'm not sure if that will help here, but I normally check it for remote access stuff. (Worth a shot if you have not)
If that does not help, I'd suggest a TAC case.
It's working for me.
Thankyou so much.