I cannot access UNC paths on my servers in a remote Powershell session from my local machine. I can use them directly from the Servers Cmd command line.
Actually, I went to the server and mapped the UNC path as a local drive (say, X :). The option "Connect by connection" is used.
I have a batch file that is on this X drive: I want to run it remotely using the invoke command from my local script. But it fails.
It says: "Cannot find the drive. A drive named X does not exist."
In addition, when I try to map a drive using the net use command in the script block, then it also throws an error - System error 1223 - Native Command Error.
I use administrator credentials to log in to this server.
Can someone help me with this, all I want to do is run a remote script that is on this UNC path?
Also, when I find the UNC path on the server as a local drive, why can't I use it in a remote PS session?
Thanks at Advance. TS
source share