How to delete hiberfil.sys

Getting rid of hiberfil.sys in Windows 7 and Windows Server 2008 r2 is much harder than your would expect. This file appears on the server even if you have no plans to use hibernation, and it wastes disk space, especially on a terminal server.  A simple command from the command prompt will remove it:
powercfg -h off