Bigtime5000 Posted March 11, 2008 Share Posted March 11, 2008 Hi guys, Sorry if this has been asked before (I have looked ). Can anyone give me any advice/ guidence on the following problem I have.The situation is I work for the IT dept of a school, probably about 600 pc`s maybe more. currently I have thenm all set to autopower on at 8:00AMbut there are an awfull lot of them that just get left on all night.What I am looking for is a script or something that will run at a specific time and shut the pc`s down. The only issue I can possibly see is that all the students have there own logon on the domain. so the pc`s are usually locked when a student is not using them so the script would need to run in the background I guess.Any help or advice would be greatThanks in advance Link to comment Share on other sites More sharing options...
luke.mccormick Posted March 11, 2008 Share Posted March 11, 2008 Set it up as a scheduled task? Link to comment Share on other sites More sharing options...
kimokid Posted March 11, 2008 Share Posted March 11, 2008 Hi,Have a look at AutoIT, there are some scripts there to automatically shutdown the PC, also look into running script as a service, this will allow it to be run when PC is locked or logged out. http://www.autoitscript.com/forum/index.ph...amp;hl=shutdown Link to comment Share on other sites More sharing options...
Glenn9999 Posted March 11, 2008 Share Posted March 11, 2008 A scheduled task would be what you would want. The question that remains is how, and to that end you would need to identify the main OS in question. Very easy if it's XP (and probably Vista) - look into the shutdown command.You could try something like:C:\> at 18:00 /interactive /every:M,T,W,Th,F,S,Su c:\windows\shutdown.exe -i -l 600 -m “It is way past the time you should be at home. Come back tomorrow.”Documentation:ATSchTasks - more proper for XP perhapsShutdown Link to comment Share on other sites More sharing options...
Bigtime5000 Posted March 11, 2008 Author Share Posted March 11, 2008 Thanks for the quick reply`s guys. Just looking into your suggestions now Link to comment Share on other sites More sharing options...
Team929 Posted March 27, 2008 Share Posted March 27, 2008 Don't know if all OS's have shutdown.exe so you can google and download it as the previous thread says. I believe the one I have used is a stand-alone executable that shuts down the PC and can be called through a script. Or a batch file called from a scheduled task, etc., whichever you like. Link to comment Share on other sites More sharing options...
gunsmokingman Posted March 27, 2008 Share Posted March 27, 2008 Here is a vbs script that you might be able to use. Since it using WMI you can run it against remote machines. Const LogOff = 0, Shutdown = 1, Reboot = 2,PowerOff = 8 Dim ObjOS, strComputer, StrOS, Wmi strComputer = "." Set Wmi = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\" & _ strComputer & "\root\cimv2") Set ObjOS = Wmi.ExecQuery("Select * from Win32_OperatingSystem") For Each StrOS in ObjOS'-> 4 Means Force The System StrOS.Shutdown(Shutdown + 4) Next Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now