I need some Windows 2012 servers to be shutdown properly with the power button.
- If nobody is logged, the power button correctly shuts down the server
- If somebody is logged without a blocking program, it's okay too
But:
- if a session is locked, the power button does nothing
- if somebody is logged with a blocking program (notepad with an unsaved document for example), the button does nothing too
With previous Windows versions I was used to configure the power button behaviour with the GUI and modify a registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\shutdownwithoutlogon
) but this seems not any more relevant.
Does anyone knows the "offical" way, or a trick ?
Edit:
The system log display an event each time I press the power button. The kernel power manager has initiated a shutdown transition
with event ID 109.
When the session is locked, this event is followed by nothing. And no other events in other logs.
When a program refuse to close, I have the corresponding log entry, so this will be okay soon.