Disable Hibernation on Servers

Here’s a quick tip if you should find several GB of your system drive taken up with hiberfil.sys on a production server machine (as I recently did with a virtual server with a very small C partition) – Disable Hibernation.

Disable Hibernation

  1. Open a command prompt as administrator

  2. Run this command:

powercfg –h off

  1. Done!

The hiberfil.sys file should immediately disappear. This also works on desktop computers that never use hibernate, of course. Thanks to SpearManfor the tip. I’ve only tested this on Windows Server 2008, but I’m pretty sure it will work on most modern versions of Windows (7, Vista, 2008 R2, etc.).

If you liked this post, consider subscribing to email updates about my new posts, or sharing it on Hacker News.

Keyboard shortcuts

?
Show this help
Esc
Close this help or an open menu
n
Next (newer) post: Budding Versus Festering Code
p
Previous (older) post: Default Encoding of Strings in ASP.NET MVC 2
Tab
Move between links and buttons (Shift+Tab to go back)