Unable to access UNC Paths in Powershell remote session

You’ve really got 3 different things going on here.

1 & 3. Drives are only mapped when you log on interactively. So when you remoted into the other computer, mapped a drive, and then logged off/disconnected, that mapped drive was disconnected. Except in interactive GUI user sessions, you cannot depend upon a mapped drive letter that you don’t create yourself. Within scripts or any remote session, just use UNC paths for everything – it’s more reliable.

2 . When you attempt to map the drive in the remote PS session, you’re encountering what’s known as the “double hop” problem. There is a solution to this, but there’s extra setup you have to do. See Double hop access to copy files without CredSSP

Leave a Comment