Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

"Cannot find path ... because it does not exist"

$
0
0

Hi All;

I'm in the midst of trying to utilize psremoting with a swath of domain joined machines, but running into what seems like an issue with a simple fix.  Ultimately the idea is that these machines will run a script that creates a dir locally and pulls down several script files that need to be run locally.  To that end from a server, as the domain admin, I've tried on one machine to test:

Enter-PsSession COMP01
CD \\server\path\scripts

which received: "Cannot find path \\server\path\scripts because it does not exist"

That path is on the same server I'm PsRemoting from, so wouldn't think the multi-hop issue comes into play.  To further test though I remoted into said machine and from a Posh prompt "cd'd" to that same directory without issue (and while logged in as the non-admin user).

From the server I also tried:

Invoke-Command { \\server\path\scripts\scriptname.ps1 } -computername COMP01

and 

Invoke-Command -ComputerName COMP01 -FilePath \\server\path\scripts\scriptname.ps1

both of which received the same "cannot find path".

I saw items about the Cred issue, which I admittedly haven't tried yet, but wouldn't that then mean that any script using it wouldn't be unattended as someone would need to enter the password?


Viewing all articles
Browse latest Browse all 6937

Trending Articles