nirsoft.net has a utility, nircmd.exe, that does about a bazillion utility things, many of which are useful in a Media Center environment.
Five of which are; shutdown, reboot, hibernate, sleep, and logoff.
Very easy to call from a batch file or command line or as a macro from any MCE interface.