Or if you have the Resource Kit and AT is enabled:
AT timetoshutdown shutdown /l /y /c
where shutdown is a resource kit utility with parms:
/c : close all programs
/y : turn off any prompts - no user involvement
/l : turn off local PC
/r : if you want the PC to reboot rather than shutdown
This kind of utility has obvious value to automate the shutdown of computer labs at end of day, computer rooms prior to a powerdown, user workstations prior to a powerdown, ... Assuming administrative rights, a batch file can automate these tasks. Another commandline advantage.