To shut down Win2K, you need to use either the shutdown.exe utility that’s provided in the Resource Kit or, if you don’t have the Resource kit, you can download and use the freeware psShutdown utility from Sysinternals
http://www.systernals.com . The psShutdown utility can be found at the following URL:
http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtmlXP incorporates the shutdown command into its native command set so to shut down an XP system, you can simply enter the shutdown command at the command prompt.
Windows Script Host (WSH) scripting also provides another method of shutting down a Win2K/XP system. An example WSH script to shut down the system follows:
'WSHShutdown.vbs
Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select *
from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.ShutDown()
next
Snip fra:
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=25339&