Disable Shutdown, Restart Options
You can shut down a Windows system using the command line with the shutdown
command. Here are different ways to use it:
Basic Shutdown Command
shutdown /s /t 0
Shutdown Using PowerShell
Stop-Computer -Force
Shutdown with a Custom Message
shutdown /s /t 30 /c "System maintenance in progress. Please save your work."
Shutdown a Remote Computer
shutdown /s /m \\RemoteComputerName /t 0
Disable Shutdown, Restart
To disable the Shutdown and Restart options in Windows Server using Group Policy (GPO), follow these steps:
Method 1: Using Group Policy Editor (GPO)
Open Group Policy Management
Press
Win + R
, typegpedit.msc
, and press Enter. (If you're using a domain environment, opengpmc.msc
instead.)
Navigate to the Policy Location
Go to:
User Configuration → Administrative Templates → Start Menu and Taskbar
Enable the Policy to Remove Shutdown and Restart
Find "Remove and prevent access to the Shut Down, Restart, Sleep, and Hibernate commands".
Double-click it, select Enabled, then click OK.
Apply and Enforce the Policy
Run the following command in Command Prompt or PowerShell to apply changes:
gpupdate /force
Method 2: Using Group Policy Management (For Domain Environments)
If managing via Active Directory, apply the same setting through Group Policy Management (gpmc.msc
) by editing the appropriate GPO linked to user groups or organizational units (OUs).
Result
The Shutdown, Restart, Sleep, and Hibernate options will be removed from the Start Menu, Ctrl+Alt+Del screen, and Alt+F4 shutdown dialog.
Users will no longer be able to shut down or restart the server via the GUI.
Alternative: Disable Shutdown via Permissions
If you want to prevent shutdown via the command line as well:
Open Local Security Policy (
secpol.msc
).Navigate to:
Security Settings → Local Policies → User Rights Assignment
Find "Shutdown the system" and remove all non-admin users.
This ensures only administrators can shut down the system.
Last updated
Was this helpful?