Just like Maurits said, shutdown.exe

It does work on XP and actually any NT-based OS.

I use "shutdown -r -f" all the time.  R is to restart and F is to force shutdown.  Just in case some app is hanging and XP has already shutdown VNC/RDP to the point where you can't "End Task"