Auto shutdown

  • Thread starter Thread starter Brent
  • Start date Start date
B

Brent

I would like the Windows XP system in our classrooms to automatically shut
them selves off at a certain time at night if they are left on after the
teacher has left for the day. I am thinking about creating a shortcut using
the SHUTDOWN -s command and adding it to Windows Task Scheduler of the PC.
I wanted to ask if there was a way to do it through Active Directory, Group
Policy or a better way to do this before I went and configured all the
systems.

Thanks,
Brent
 
Yes. Use the script below within a startup script within a Group Policy.

HOW TO: Assign Scripts in Windows 2000:
http://support.microsoft.com/default.aspx?scid=kb;en-us;322241

Script Code from TechNet Script Center. (VBS)

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create _
("shutdown -s", "********123000.000000-420", _
True , 1 OR 4 OR 16, , , JobID)
Wscript.Echo errJobCreated



--
Regards,

Christoffer Andersson
No email replies please - reply in the newsgroup
If the information was help full, you can let me know at:
http://www.itsystem.se/employers.asp?ID=1
 
Thanks for the info.

I am new to using Windows scripting and I am unsure how to change the
settings in the script that correspond to the settings in the task
scheduler.

I went to the TechNet scripting center but it did not give much info on the
script. According to the sample page it says that the script will run at
12:30 PM every Monday, Wednesday, and Friday. However when I ran the script
it schedule it to run at 2:30 PM instead of 12:30 PM.

What does the ""********123000.000000-420", _
True , 1 OR 4 OR 16, , , JobID" part of the script correspond to? I assume
that the "1230" after the asterisks is the time, is the time set in 12 or 24
hour format?

Thanks,
Brent
 
I suppose the script should run after the hour format at the particular
computer. How ever I think Microsoft.public.windows.server.scripting
newsgroup can handle this question better.

--
Regards,

Christoffer Andersson
No email replies please - reply in the newsgroup
If the information was help full, you can let me know at:
http://www.itsystem.se/employers.asp?ID=1
 
Back
Top