Prevent access to shutdown, restart, sleep, hibernate commands
To do so, type mmc in start search and hit Enter to open the Microsoft Management Console. In the File tab, click on Add/Remove Snap-in.
In the left side, under the available Snap-in’s, select Group Policy Object and double-click on it.
This will open the Group Policy Wizard. Under the Local Computer Group Policy Object, click Browse.
Under the Users tab, select Non-Administrators and click OK.
Next, under the newly created Local Computer \ Non-Administrators policy object in the left pane, navigate to User Configuration > Administrative Templates > Start Menu and Taskbar.
In the right pane, select Remove and prevent access to the shutdown, restart, sleep, and hibernate commands and double-click on it. Select Enable > Apply/OK.
If you enable this policy setting, the Power button, and the Shut Down, Restart, Sleep, and Hibernate commands are removed from the Start menu. The Power button is also removed from the Windows Security screen, which appears when you press CTRL+ALT+DELETE. Read: You don’t have permission to shut down and restart this computer.
Prevent specific users from shutting down Windows
You can also prevent specific users from being able to shut down the computer. To do so, open gpedit.msc and navigate to the following:
Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment > Shut Down the System.
Double click on it > Select Users > Press Remove > Apply/OK. To disallow only specific users, you will have to add the standard user account name you want to be unable to shut down or restart the computer. See how you can remove the Power or Shutdown button from Login Screen, Start Menu, WinX menu in Windows 11/10.