Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I prevent a server from becoming locked after a Remote Desktop session

As part of our databuild run a 3rd party program (3D Studio Max) to export a number of assets. Unfortunately if a user is not currently logged in, or the machine is locked, then Max does not run correctly.

This can be solved for freshly booted machines by using a method such as TweakUI for automatic login. However when a user connects via Remote Desktop (to initiate a non-scheduled build, change a setting, whatever) then after the session ends the machine is left in a locked state with Max unable to run.

I'm looking for a way to configure windows (via fair means or foul) so either it does not lock when the remote session ends, or it "unlocks" itself a short while after. I'm aware of a method under XP where you can run a batchfile on the machine which kicks the remote user off, but this does not appear to work on Windows Server.

like image 674
Andrew Grant Avatar asked Aug 20 '08 20:08

Andrew Grant


People also ask

Does Remote Desktop lock screen?

Lock a screenIn Remote Desktop , select a computer list in the sidebar of the main window, select one or more computers, then choose Interact > Lock Screen. Enter a message to be displayed on the locked screen, then click Lock Screen.

How do I increase my RDP session timeout?

To increase the Remote Desktop logon timeout for multiple computers joined to an Active Directory domain with Group Policy, add the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\LogonTimeout value to a GPO (Group Policy object) as a registry preference item.


2 Answers

There is a separate terminal service connection available called the 'console' connection.

You can connect to this space using mstsc /console /v:servername. Use mstsc /? for full command line options.

This allows you to connect, open up the terminal services manager and boot the bad sessions.

like image 150
samjudson Avatar answered Sep 22 '22 06:09

samjudson


Logging in over RDP shouldn't affect whether the console locks. If you don't log out of RDP (just closing the client keeps your session pending), then your session will be locked. You can solve that with idle timeouts in Terminal Services Manager.

If your console is locking, that's a seperate policy in Local Computer Settings or some such. If you have a domain, set it with a GPO. If you need the exact name of the policy, let me know and I'll dig it up for you.

like image 20
Mark Brackett Avatar answered Sep 22 '22 06:09

Mark Brackett