The following Matlab project contains the source code and Matlab examples used for shutdown, sleep, hibernate etc. of windows computers .
WinPower - Mex function to set the power status on Windows computers
Power off, shut down, logoff, sleep, reboot, reboot and restart Matlab, disable/enable sleeping, lock
Command: String, not case-sensitive.