Category filter

Script to hide Restart option in Windows 10/11 devices

In case the organization wants to prevent accidental restarts of their company devices by their employees, Windows offers a provision in the Registry editor to hide the Restart option. IT admins can simplify this process by running a script in the Windows 10/11 device to hide the Restart option from the Start Menu, the Windows sign-in screen, and the ALT+CTRL+DEL screen. Hexnode UEM allows IT admins to remotely deploy these scripts to the endpoints using the Execute Custom Script action.


The sample scripts provided below are adapted from third-party open-source sites.

Batch script

Hide Restart option

Updating the data of registry option “HideRestart” present under HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start in the Registry Editor to 1 hides the Restart option in the device. /f is used to force the overwriting of the existing entry without prompting.

Re-enable Restart option

Changing the value assigned to registry option “HideRestart” back to 0 brings back the Restart option in the device.

PowerShell script

Hide Restart option

The script uses the Set-ItemProperty cmdlet to change the value of the registry option “HideRestart” to 1, thus removing the Restart option from the Start Menu, Windows sign-in screen, and ALT+CTRL+DEL screen.

Re-enable Restart option

Setting the –Value parameter back to 0 in the previous script re-enables the Restart option in the device.


  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository