Quantcast
Channel: Security forum
Viewing all articles
Browse latest Browse all 12072

net use via Powershell returning A specified logon session does not exist. It may already have been terminated error

$
0
0

I'm getting this error when running net use command via powershell.

System error 1312 has occurred.
    + CategoryInfo          : NotSpecified: (System error 1312 has occurred.:S
   tring) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
    + PSComputerName        : xxxxxxxxx

A specified logon session does not exist. It may already have been terminated.

The command that i am running is " powershell invoke-command -computername xxxxx {net use \\share /user:<domain>\<username> password} "

Running net use locally on the box runs fine without any issues, the same command using powershell remote execution is causing the command to fail. 

PS-Remoting and Configure-SMRemoting -enable have been run on the remote box.

Any ideas on how to resolve the issue?


Please remember to mark the replies as answers if they help Thanks, --Kuldeep


Viewing all articles
Browse latest Browse all 12072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>