Scheduled Tasks|Advanced|View Log may provide some details. You might also
try using shutdown.exe Something like;
%systemroot%\system32\shutdown.exe -r
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Hiwj" wrote:
>I am trying to run a script to reboot my servers with a scheduled task
> (running as the Administrator):
>
> Set OpSysSet =
> GetObject("winmgmts:{(Shutdown)}!\\.\root\cimv2"). ExecQuery("select * from
> Win32_OperatingSystem where Primary=true")
> For Each OpSys in OpSysSet
> OpSys.Reboot()
> Next
>
> The script doesn't work. However, if I logon as the Administrator and run
> the script then it works fine.
>
> What's the difference from running it logged on as the Administrator,
> compared to running it from a scheduled task as the Administrator?