0

I want to use the session of the local administrator through RDP.

Sometime when I connect trought RDP, all programs that were open in locally are closed and the session is completely new.

I just want to use the same session when connecting through RDP as when I logon locally.

2
  • The most likely cause is that you accidentally logged out the last time you were connected, second most likely is that you were logged in with a different account. Connecting through RDP will never log out an existing session. It is however possible in principle for a user to be logged into two different sessions at once - check in the Users tab in Task Manager to see if this is happening, and if so, please update your question accordingly. Sep 10, 2019 at 18:50
  • 2
    ... actually on second thoughts if this only happens sometimes, the most likely cause is that Windows Update has rebooted your computer. Check the uptime in the Performance tab in Task Manager. Sep 10, 2019 at 18:53

1 Answer 1

1

The local (administrative) user always gets session #0. You can see that in Taskmanager ('users' tab) or by using

C:\> echo This is %sessionname%
This is This is RDP-Tcp#0

on the command line.

From remote machines, you can connect to that specific session through RPD with the /admin or /console parameter of mstsc. Just run mstsc /V:<SERVERNAME> /admin to do that.

The session will stay alive as long as its not logged off (or the computer is shut down). Do not log off the user, just disconnect the RDP session or lock the screen when logged on locally.

2
  • When Microsoft talk about "session 0" they mean the session ID, which you can make visible in the Task Manager details tab by right-clicking on the column headers and choosing "Select Columns". Only services run in session 0 in modern versions of Windows. The /console flag no longer allows you to connect to session 0. The /admin flag affects licensing and some other things but does not connect you to session 0. Sep 10, 2019 at 18:40
  • ... unfortunately Microsoft use "session ID" to identify the context in which the processes are running and "session name" to identify the channel the user is connected to the session with. And also "logon session" which in some contexts means something completely different again, related to authentication ... it's a mess. Sep 10, 2019 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .