Restarting a PC

  • Thread starter Thread starter BRuce
  • Start date Start date
B

BRuce

I am using W2K I would like to reboot my pc automatically
with or without being signed on. does anyone know how to
do that
 
BRuce said:
I am using W2K I would like to reboot my pc automatically
with or without being signed on. does anyone know how to
do that

Run this script from the task scheduler from and Admin account:
'WMIRestart.vbs
set osSet = GetObject("winmgmts:").InstancesOf("Win32_OperatingSystem")
for each os in osSet
os.Win32Shutdown(6)
next

6 is a forced reboot vs 2, reboot.
12 forced power off, 8 power off
4 forced logoff, 0 logoff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top