_Bat_ Posted March 5, 2007 Posted March 5, 2007 Here it is. Only works for XP. Hope it works. As we are getting a new computers with XP Pro across the entire school soon, my original issues are now resolved. I'm gonna download a copy of this and keep it for when the new computers are installed. Thanks for this
linkazoid Posted February 18, 2008 Posted February 18, 2008 In a startup script (on our image that is cloned / or in a group policy startup script) REM Delete all tasks (not needed, butin case some evil person already has) schtasks /delete /tn * /f REM Create a task for this computer to shut itself down at 6pm schtasks /create /sc daily /st 18:00:00 /tn "Shutdown at 1800" /tr "shutdown -s -t 60 -c \"This computer is scheduled to automatically shutdown at this time. You have 60 seconds to save all your work and logoff.\"" /ru system This way theres no "I need a list of pc's" or "use this tool just search google all day" these are all in windows already and just need to be run once per machine - or placed carefully in a startup script. (Note, this is used on WinXP clients, with 2000 YMMV) fooby Sorry for digging up such an thread. But the holiday is here and work must go on! This script works when i run it on my computer, but when i save it as a .bat and set it to a logon script it doesn't run. Could anyone shed any light? Mike
eean Posted February 18, 2008 Posted February 18, 2008 This script works when i run it on my computer, but when i save it as a .bat and set it to a logon script it doesn't run. The logon script doesn't have admin rights to the local machine? You can't have non-admins able to create scheduled tasks that run with system rights - that'd be a huge security hole! Try creating an MSI that will execute your batch file. You can do this easily through Windows Installer Wrapper Wizard You can then pop this into active directory and it will run with elevated rights.
Michael Posted February 18, 2008 Posted February 18, 2008 I use the following tool which I schedule to run every evening. Save it in a folder called Remoteshutdown on any server. Now open up notepad and copy the following: REM \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ REM REM ICT Shutdown Script REM Shutdown Time: [i]time[/i] REM Scheduled on [i]servername[/i] REM REM REM \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ remoteshutdown.exe /remote:[i]Computername[/i] /f remoteshutdown.exe /remote:[i]Computername[/i] /f remoteshutdown.exe /remote:[i]Computername[/i] /f remoteshutdown.exe /remote:[i]Computername[/i] /f remoteshutdown.exe /remote:[i]Computername[/i] /f remoteshutdown.exe /remote:[i]Computername[/i] /f Replace Computername with your actual workstation names. Now save the file as Remoteshutdown.bat in the Remoteshutdown folder. Now run Scheduled Tasks and when prompted, choose the batch file you've just created to run at a select time, daily, with domain admin credentials. That's it, job done. Your workstations will shutdown at the scheduled time. I use this at many schools running on 2003 Server and XP clients. I haven't tested it on Vista yet.
linkazoid Posted February 19, 2008 Posted February 19, 2008 I've decided to use the "system shutdown v1.1.msi" and this works perfectly, it installs ok on the computer startup as supposed to, but after installation it shutsdown the computer! can anyone modify the msi to stop it doing this.=? Thanks Mike
Sunderwood Posted February 19, 2008 Posted February 19, 2008 Or you can do what we do and write a script that emails me and all of SMT everynight which machines and which rooms are left on and it soon stops!! 1
eean Posted February 19, 2008 Posted February 19, 2008 I've decided to use the "system shutdown v1.1.msi" and this works perfectly, it installs ok on the computer startup as supposed to, but after installation it shutsdown the computer! can anyone modify the msi to stop it doing this.=? Shutsdown the computer? It doesn't do this on our system. (I made it, by the way) it might restart the computer (I don't think it does) but I don't even know how to make shutdown! Is there any chance it was a fluke, eg. caused by WSUS applying some updates?
linkazoid Posted February 20, 2008 Posted February 20, 2008 Thanks for the program! works a treat, cant understand why it shuts down tho, but the week is running out so i shall just email the staff giving them warning of the shutdown on first switching back on. Many Thanks Mike
ChrisN-0123 Posted April 28, 2013 Posted April 28, 2013 Hi all!! Does anyone know of a shutdown program thst you can schedule to force a shutdown..but with a pop up letting a user cancel? Would prefer to have cancel option up a good 15 minutes. Im using the shutdown command at the moment..but have to fun this later at night as more and more staff are staying later now and especially need a cancel button for parents evening/training etc. Dont care if its free or pay for as i've been looking for a long time now and just want it sorted. Cheers!
ChrisN-0123 Posted April 28, 2013 Posted April 28, 2013 Think ive found one called WinMend Auto shutdown. Looks like I have to install it..but is free and has a cancel button!!! Will report back if it works on win7.
Homeland Posted April 28, 2013 Posted April 28, 2013 We use a programme called netsupport; Welcome to the home of NetSupport it give the teachers the option of classroom control but also has a technician console, this means that if people do leave pc’s on I can not only connect to them but turn them off, restart or with the aid of pxe boot turn the pc’s on for them, it’s a fantastic programme.
ChrisN-0123 Posted April 28, 2013 Posted April 28, 2013 Ive got that...good software. I use that to shutdown the pcs manually..but cant get it to auto shutdown. Also doesnt give the user an option to cancel shutdown.
Homeland Posted April 28, 2013 Posted April 28, 2013 Have you looked at spiceworks, Free IT Community, Help Desk, and Network Monitoring - Spiceworks Its free and you can automate startup and shutdown, not to sure if you can cancel it though but as it does work via a scheduled task you could cancel the task to stop it I suppose.
eean Posted April 28, 2013 Posted April 28, 2013 Back in the day I used psshutdown - have a google and see if it's still about.
mikeyd101 Posted April 30, 2013 Posted April 30, 2013 If you have WMI available on the machines you can control them with that scripted. I have just started working on custom solution for our school, for wake, reboot and shutdown machine groups. I create text files for machine groups e.g labs containing lists of machine names and mac addresses (machine name used for reboot and shutdown, mac used for wake). I'm also using powershell and the scripts are still work in progress but might be handy for some one else looking for same thing, I'm hoping to expand the functions and build and management web framework around them. Shutdown.ps1 #### Provide the computer name in $computername variable $ServerName = Get-Content $args[0] ##### Script Starts Here ###### foreach ($Server in $ServerName) { $machine = $Server.split(",")[0] Write-Host Shutting Down $machine Get-WmiObject win32_operatingsystem -ComputerName $machine | Invoke-WMIMethod -name Win32Shutdown } ########## end of script ####################### Restart.ps1 #### Provide the computer name in $computername variable Param ([switch]$force) $shutdownValue = 2 if ($force -eq $true) $shutdownValue = 6 $ServerName = Get-Content $args[0] ##### Script Starts Here ###### foreach ($Server in $ServerName) { $machine = $Server.split(",")[0] Write-Host Shutting Down $machine # 0 (0x0) Log Off # 4 (0x4) Forced Log Off (0 + 4) # 1 (0x1) Shutdown # 5 (0x5) Forced Shutdown (1 + 4) # 2 (0x2) Reboot # 6 (0x6) Forced Reboot (2 + 4) # 8 (0x8) Power Off # 12 (0xC) Forced Power Off (8 + 4) Get-WmiObject win32_operatingsystem -ComputerName $machine | Invoke-WMIMethod -name Win32Shutdown -ArgumentList @($shutdownValue) } ########## end of script ####################### wake.ps1 Function WakeMAC([string]$macString = $(write-host 'MAC address is required')){ If ($macString -ne ""){ $mac = $macString.split(':') | %{ [byte]('0x' + $_) } } if ($mac.Length -ne 6) { write-host 'Invalid MAC address' } Else{ $UDPclient = new-Object System.Net.Sockets.UdpClient #$UDPclient.Connect(([system.Net.IPAddress]::Broadcast),4000) #write-host ([system.Net.IPAddress]::Broadcast) $UDPclient.Connect($ip,$port) $packet = [byte[]](,0xFF * 102) 6..101 |% { $packet[$_] = $mac[($_%6)]} [Void] $UDPclient.Send($packet, $packet.Length) [Void] $UDPclient.Send($packet, $packet.Length) [Void] $UDPclient.Send($packet, $packet.Length) write-host "Wake-On-Lan magic packet of length $($packet.Length) sent to $macString" } } [string]$ip="10.105.103.255" [int]$port=7 $machines = Get-Content $args[0] # wake all the machines in the group foreach ($machine in $machines) { write-host machine $machine ip $ip port $port $mname = $machine.split(",")[0] $mmac = $machine.split(",")[1] write-host Waking $mname mac $mmac wakeMAC($mmac) Start-Sleep -seconds 1 # Prevent boot storm } ping.ps1 #### Provide the computer name in $computername variable $ServerName = Get-Content $args[0] ##### Script Starts Here ###### foreach ($Server in $ServerName) { $machine = $Server.split(",")[0] if (test-Connection -ComputerName $machine -Count 1 -Quiet ) { Write-Host $machine "alive" } else { Write-Warning "$machine No Reply" } } ########## end of script #######################
ChrisN-0123 Posted May 21, 2013 Posted May 21, 2013 Still struggling to find a program that will let the end user cancel shutdown! Any ideas? I may have to write a program..but I'm not good at code! lol
strawberry Posted May 21, 2013 Posted May 21, 2013 Still struggling to find a program that will let the end user cancel shutdown! Any ideas? I may have to write a program..but I'm not good at code! lol This. Coretech Blog » Blog Archive » Configuration Manager shutdown utility
ChrisN-0123 Posted May 21, 2013 Posted May 21, 2013 That's absolutely perfect, thanks loads strawberry!
fiza Posted May 21, 2013 Posted May 21, 2013 This. Coretech Blog » Blog Archive » Configuration Manager shutdown utility Is this a standalone program or do you need "configuration Manager" to use it?
strawberry Posted May 21, 2013 Posted May 21, 2013 can be standalone, is perfect for sccm. You can use GPP to deploy the files, then use either a scheduled task or a remote command line to call it. 1
edutech4schools Posted May 21, 2013 Posted May 21, 2013 I am trying do download Configuration Manager shutdown utility but the site says I need to log in. Anyone got the software? or tell me how I log in.
fiza Posted May 21, 2013 Posted May 21, 2013 I am trying do download Configuration Manager shutdown utility but the site says I need to log in. Anyone got the software? or tell me how I log in. Same here
edutech4schools Posted May 21, 2013 Posted May 21, 2013 got it http://blog.coretech.dk/download/ShutdownTool-0.9.2BETA2.rar 1
ChrisN-0123 Posted May 21, 2013 Posted May 21, 2013 yeah I couldnt logon..but clicked blogs and there was shutdown software link in there somewhere..downloaded and runs perfectly. Got a scheduled task set within group policy to run it. PERFECT! Thanks save a fortune with these staff who are too lazy to shutdown each night.
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