Scenario: I have 3 computers: Comp1, Comp2, Comp3.
Comp3 has a network share, with a file in it.
I'm trying to write a PowerShell script that will run on Comp1; it will run a Remote PowerShell session on Comp2, which will copy the file from Comp3's share and carry out further commands using the file.
When I run the script, it keeps telling me Access Denied when it tries to access the network share. If I take the contents of the remote script and run it locally on Comp2, it works perfectly.
I've confirmed with "whoami" that it is running under the same account on Comp1 remoting into Comp2, and Comp2 locally (currently using domain admin, for testing purposes).
I even tried taking the PowerShell script and running it on the system using PSExec to launch the PowerShell session on Comp2, with the same result.
Any suggestions appreciated.