XP has a tool named shutdown.exe, located in the c:\windows\system32 folder, that you can use to execute a scheduled shutdown.
Add a new scheduled task in Control Panel, using this program and the appropriate parameters:
-l log off user
-s shut down local system
-m \\XYZ shut down remote system
-r reboot after shutdown
-f force applications to close (careful: data loss possible)
-t xx set xx seconds shutdown delay
-a abort scheduled shutdown (to be used from a command prompt)
Pulled From Deja.com.
Sysinternals also has a free tool available, psshutdown - it works remotely over RPC too!
It's safer to use shutdown "with force" to reboot a PC remotely, in case an application prevents a reboot after your remote connection has been killed. e.g. shutdown -r -f -t 30
Newer versions of Windows have more REQUIRED parameters... stupidly hard to figure out when you need it... so here is an example: shutdown /r /f /t 120 /c "server reboot" /d p:1:1
tags: reboot, command, cmd, dos, schedule, shutdown