Shutdown command in Windows XP allows you to shutdown/log off/restart from command prompt.
Shutdown System
shutdown -s
Shutdown after specified time
shutdown -s -t xx xx = time in seconds
Restart
shutdown -r
Log Off
shutdown -l
Abort Shutdown
shutdown -a
For more switches run the command
shutdown /?