12

I have a stand alone windows 2012 server R2 that i log on to locally. it is not part of a domain and it is the standard install configuration with no policies enacted. The server logs off the desktop and locks it with a password. How can i prevent this?

2
  • It either logs off the session or it locks the session, it doesn't do both. That being said, it's either the screensaver or the power configuration settings that you need to look at.
    – joeqwerty
    Oct 15, 2013 at 18:39
  • it makes it so i have to do a ctrl alt del and enter a password to log back on. I checked under screensaver it says none and under power settings the only choice is turn off display. It is not turning the display off it just makes it so i have to enter the ctrl alt del and password is there no way to disable that?
    – alphadev
    Oct 15, 2013 at 18:46

9 Answers 9

11

In brief

  1. Unlock/turn on console log display off timeout feature in Power Option

  2. Set timeout to 0 to turn it off.

Detail Steps

Unlocked the missing Power Settings feature in Server 2012.

  1. Open the following registry key - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\7516b95f-f776-4464-8c53-06167f40cc99\8EC4B3A5-6868-48c2-BE75-4F3044BE88A7

  2. Set the following value - Attributes => 2

  3. Now open Control Panel>Power Options>Change Plan Settings>Change Advanced Power Settings
    a. The new Display section Console lock display off timeout is now available.
    b. Configure your “Plugged in” value accordingly (0 to disable)

Done.

p.s.

You may want to download my export .reg file and run it on your machine as a shortcut for step 1 & 2 above i.e. enabling console log display off timeout.

enter image description here

3
  • 3
    I tried this but the lock screen still occurs...
    – Nam G VU
    Nov 7, 2014 at 10:40
  • 1
    I don't even see this last key in my registry.
    – Allison
    Jul 11, 2017 at 15:32
  • i've tried, but not work. can you check it for me? imgur.com/a/rFSsN
    – Luke
    Oct 23, 2017 at 10:17
7

The server is not logging off your session, it is simply locking the screen. You can change this behavior in Power Options in control panel. It's under Display.

3
  • it makes it so i have to do a ctrl alt del and enter a password to log back on. I checked under screensaver it says none and under power settings the only choice is turn off display. It is not turning the display off it just makes it so i have to enter the ctrl alt del and password is there no way to disable that?
    – alphadev
    Oct 15, 2013 at 18:47
  • 1
    Looks like you have to add a registry key as well on 2012 and later: blog.scosby.com/post/2012/12/13/…
    – MDMarra
    Oct 15, 2013 at 18:49
  • the registry key addition is what stops the screen from locking which is why i was looking for
    – alphadev
    Oct 16, 2013 at 15:45
7

I know this is an old question, but this information might be useful to others:

If you are running in a domain environment, create this setting accordingly in a GPO, otherwise configure the local GPO (gpedit.msc):

Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> Security Options -> Interactive logon: Machine inactivity limit

If you wann prevent lockout set it to zero, keep in mind the security impact this change can have dependent on your environment.

1
  • Doesn't work for me in Server 2016. Mar 22, 2018 at 3:12
3

Expanding Cowboy's answer.

List the power schemes, this will report a list of schems with GUIDs and names.

powercfg /L

The GUIDs have aliases

powercfg -aliases

Common aliases are

SCHEME_MAX = Power saver (Max power saving)
SCHEME_BALANCED = Balanced (Typical)
SCHEME_MIN = High performance (Min power saving)

Then disable for all standard power schemes, for AC and DC.

powercfg /setacvalueindex SCHEME_MIN SUB_NONE CONSOLELOCK 000
powercfg /setdcvalueindex SCHEME_MIN SUB_NONE CONSOLELOCK 000
powercfg /setacvalueindex SCHEME_MAX SUB_NONE CONSOLELOCK 000
powercfg /setdcvalueindex SCHEME_MAX SUB_NONE CONSOLELOCK 000
powercfg /setacvalueindex SCHEME_BALANCED SUB_NONE CONSOLELOCK 000
powercfg /setdcvalueindex SCHEME_BALANCED SUB_NONE CONSOLELOCK 000
1

I'm running server 2012 R2 Std and the option is there. Just change it in the group policy and set it to 0 as Matze describes above. I just set up 3 2012 servers today and this is how I do it every time. Force a policy update or wait it out. Sometimes I have to log off and back on before it picks up the policy change. To force the policy update run gpupdate /force from an admin prompt.

0
1

This worked for me in Server 2016.

Open the Group Policy Object Editor and then navigate to Computer Configuration \ Administrative Templates \ System \ Power Management \ Video and Display Settings.

Enable and then change the value of Turn Off the Display (Seconds) to 0.

(Because the default seems to be 0, but when you click on Enabled it sets the value to 1!)

0

Except that option is not there anymore. The problem is that the default setting in the power configuration settings for CONSOLELOCK is 001 and there is no way to change it except by using powercfg. To display the current setting for the high performance scheme run this command:

powercfg /q SCHEME_MIN SUB_NONE

You will see the values for both AC and Battery are 001. To change them to 000 run these commands:

powercfg /setacvalueindex SCHEME_MIN SUB_NONE CONSOLELOCK 000. 
powercfg /setdcvalueindex SCHEME_MIN SUB_NONE CONSOLELOCK 000,

If you have defined a custom power scheme you will have to provide its identity.

0

Open Local Security Policy in Control Panel > System and Security > Administrative Tools, in the left panel select Security Settings > Local Policies > Security Options find and double-click Microsoft network server: Amount of idle time required before suspending session by default it should be 15 so set it to 0. See attached screenshot.enter image description here

-3

Just use the command : powercfg /h off

You must log in to answer this question.

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