3

I want to run GUI tests on my Windows Server 2012. So first I connect to my server remotely and then disconnect by using tscon: %windir%\System32\tscon.exe RDP-Tcp#NNN /dest:console as described by here: http://support.smartbear.com/viewarticle/72794/

The problem is if I don't do any tests for several minutes (15-30 mins) then it automatically logs off, so if I run my tests after that (which is through Bamboo), they don't run; however if I run them just after running that command above to disconnect then tests run fine. I also noticed that if I just run that command and then connect to the server again it doesn't have login screen; but if I wait for some period and then try to connect again then I get the login screen. I tried these methods before: How do I prevent the Welcome Screen / Lock Screen from appearing after idling in Windows 8?

How can I fix this issue?

Sarp Kaya
  • 131
  • 1
  • 2
  • 6

1 Answers1

3

It looks like you're after the Session Time Limits Group Policy settings.

You can find them in the Local Group Policy Editor (gpedit.msc) under:

Computer Configuration-Administrative Templates-Windows Components-Remote desktop Services-remote desktop Session host-session time limit.

enter image description here

These policies control the time limits for various Remote Desktop Service sessions.

Michael Frank
  • 8,091
  • 3
  • 43
  • 54