Checking the hibernate status of a Windows Server 200x

Last night I was reading about virtualising Windows Server 2008 r2 in this book: page 106. One of the many recommendations was to disable hibernation; now to disable hibernation you just need to run powercfg.exe -h off.

My quandary was how do I implement this via Group Policy? – well I couldn’t find an option to disable hibernation via Group Policy, so I wrote a vbscript that runs when the computer starts up.

This script basically looks for c:\hiberfil.sys; if it finds hiberfil.sys then it runs powercfg.exe -h off

You can find the script here. Please note I’ve uploaded the script as a text file, if you wish to run it you’d need to change it to .vbs.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.