Category filter

Script to hide the Hibernate option from the Start menu on Windows.

For system administrators seeking to customize their Windows devices to better suit their needs, it is a common preference to hide specific options from the Start menu. One such option frequently targeted for customization is the Hibernate feature, where the computer saves the current system state to the hard drive and shuts down. Upon powering back on, it restores the saved session, allowing users to continue their work from where they left off. Hiding the Hibernate option prevents users from deliberately putting their devices into hibernation. The Hibernate option can be hidden manually from the Start menu but it’s not feasible when considering a large fleet of devices. IT admins can deploy a script to hide the Hibernate option within the Start menu on Windows devices using Hexnode’s Execute Custom Script action.

Disclaimer:

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

PowerShell script

Hide Hibernate option from the Start menu

Use the following script to hide the Hibernate option on Windows devices.

The powercfg cmdlet is used to manage all customizable power system settings, including hardware-specific configurations that cannot be accessed through the Control Panel.

Unhide Hibernate option from the Start menu

Use the following script to unhide the Hibernate option on Windows devices.

Batch script

Use the following script to hide the Hibernate option on Windows devices.

The “-h” parameter is used to control the hibernation feature. In the above command, the “-h off” parameter disables the hibernation feature.

Use the following script to unhide the Hibernate option on Windows devices.

In the above command, the “-h on” parameter enables the hibernation feature.

Notes:

  • 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