5

I have a new windows server 2019 machine and now is confused with the ALT+F4 behavior. On my windows 10 and windows server 2016 machines, when I press ALT+F4 with the system focus on desktop, a prompt dialog will popup to let me choose what to do: logoff, shutdown, or restart, etc. But on windows server 2019, the dialog will not popup in some cases and the session is logged off immediately, and all applications are shutdown. This is not what I want and is very inconvenient. For example, when I press ALT+F4 to shutdown one application, occasionally the application lost focus, then the whole system is logged off, all other applications are shutdown. Definitely this is NOT what I meant to do. I tried some different users, here is the result:

  • login as local administrator, the dialog popup as expected.
  • login as local user, e.g. user1, no dialog.
  • add user1 into local Administrators group, still no dialog.
  • add the machine into domain, login as Domain Administrator, the dialog popup as expected.
  • login as domain user, no dialog.
  • add the domain user into local Administrators group, no dialog.

Seems that the dialog pops up only when login as local admin or domain admin. How to make it always pops up on ALT+F4 for all users?

0

This dialog box shows up only if the current user can shutdown (and restart) the current Server.

If the user can't shutdown the server, the dialog box is not displayed.

Technically, you can allow your users to shutdown the server if you want: via security policies

| improve this answer | |
  • 1
    I have added a domain user into local Administrators group and can shutdown/restart the server using that user, still no dialog. How ever the following workaround works: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoClose"=dword:00000001 – goldenbull May 17 '19 at 2:57
  • 1
    I added this value in isolation (no other changes made) and do not find that it restores the prior behavior. It prevents <ALT>-<F4> from closing Windows Explorer (instead presenting the user with the old Group Policy restriction dialog "This operation has been cancelled due to restrictions..."). I suppose that's better than nothing but, egad, how did this make it past quality control to begin with? – Evan Anderson Aug 6 '19 at 15:07
0

It definitely has something to do with UAC. With GP -> Computer -> Windows Settings -> Security Settings -> Local Policies -> Security Options -> User Account Control: Run all administrators in Admin Approval Mode = DISABLED (which turns off UAC completely) then the shutdown dialog works just fine. Still investigating further since I don't really want to do this but it may help others or at least help others to find a proper fix.

| improve this answer | |
0

Solution found! (EDITED - Added solution from Technet that I posted there) Thanks for the info jdoh about the UAC, that pointed me in the right direction.

So as jdoh mentioned, when the UAC is disabled functionality is restored, however, this is not a realistic option. If you're not familiar with how the UAC works, in a nutshell, it actually strips out the 'Adminstrator' (and other built-in privileged groups) token from your login while doing regular (non-elevated) tasks. The OS is looking for the "SeShutdownPrivilege" right to determine who is allowed to bring up the 'Shut Down Windows' box when you press ALT-F4. By default only the 'Administrator' or 'Backup Operators' can do this, but they both get stripped out by UAC now in Windows 2019 when doing this particular task.

The solution is to add yourself or a Domain Group you're in (preferred) to the 'Shut down the system' right within Group Policy. This is located under Computer Configuration->Windows Settings->Security Settings->Local Policies->User Rights Assignment. You can do this either locally on each machine via GPEDIT.MSC or (after testing) via Group Policy on your Domain. It will take a logout/login once you make the changes (or they have been applied from GPO) for them to take effect. If the option is grayed out while using GPEDIT.MSC, you may already have some Group Policy in your domain that is in effect and you'll have to adjust it from there.

Hope this helps!

Technet Link - https://social.technet.microsoft.com/Forums/en-US/71d6de0b-dfe3-4bff-b893-7bc7175b33f5/altf4-automatic-sign-out?forum=ws2019

| improve this answer | |
  • Can you sketch the solution in your answer? – Piotr P. Karwasz Jan 14 at 12:45
  • I updated my original post with the full answer I had posted on technet. – Jack Dobiash Jan 14 at 19:10
  • This does not work for me if I add the 'Administrators' or the 'Domain Admins' group. In the 'Shut down the system' Group Policy I already have the Administrators added. I can see in the rsop.msc view that the policy is applied but the dialog is still not showing :/ However if I add a specific user, it does work. – Darxis May 9 at 10:25
0

I can confirm the solution by Jac Dobiash works. By adding your account to "Shut down the system" local security policy.

Go to either: (Group Policy) Computer Configuration->Windows Settings->Security Settings->Local Policies->User Rights Assignment (Local Security Policy) Local Policies->User Rights Assignment

And find the item "Shut down the system". Add your account or your group to this item. Logout and login too apply the policy. Now at desktop you won't logout directly when pressing Alt+F4, but welcomed by the old shutdown options window.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.