Use PowerShell to hibernate and wake up your Windows (Server) machine

Earlier I used a Synology Diskstation 713+ as a NAS and media server. For several weeks now I switched to MS Server 2012 R2 Essentials, but I always missed the automatical sleep and wake up functioniality of the Synology device.

On Windows platforms we can use the PowerShell to achieve that.
Put that in a scheduled task to initiate hibernation state.

The next PowerShell snippet is just a dummy used to wake up the machine. This content is completely regardless (I just use this to create a event log).

To wake up just make sure to check the “Wake the computer to run this task” box in the Task Scheduler.
2015-12-31_21h36_17

Additionally we have to make sure that “Wake Timers” are allowed in the power options:
2015-12-31_22h33_35