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.
PowerShell script
Hide Hibernate option from the Start menu
Use the following script to hide the Hibernate option on Windows devices.
1 |
powercfg /hibernate off |
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.
1 |
powercfg /hibernate on |
Batch script
Use the following script to hide the Hibernate option on Windows devices.
1 |
Powercfg –h off |
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.
1 |
Powercfg –h on |
In the above command, the “-h on” parameter enables the hibernation feature.