Hallo Andreas,
da gibt es verschiedene Möglichkeiten.
http://stackoverflow.com/questions/102567/how-to-shutdown-the-computer-from-c
http://www.dreamincode.net/forums/topic/33948-how-to-shut-down-your-computer-in-c%23/