TLARWise Posted January 31, 2020 Posted January 31, 2020 We use a powershell script run as a scheduled task on a server to remotely shutdown a computer, we run this twice a night the first time around 5pm to shutdown all computers that aren't currently logged on then again at around 10pm to force all computers to shutdown even if they have been left logged on. This has the added advantage that you can quickly disable the task if there is any evening events or modify the csv file the script uses to remove a single computer if you don't want it to shutdown one night (eg: if you are reimaging it overnight)
PyROm Posted January 31, 2020 Posted January 31, 2020 We use Impero and WOL with the default network card drivers. we set the below reg entries using GPO to control the behaviour as some of the drivers do support WOL even if they dont show the option in device manager. The repetition of some settings is to make sure that the registry entry is set on the physical network card (the 0001, 0002 etc. are the index numbers of the network devices in windows). The only problem I have had is with 20 HP machines where there wont WOL if PXE boot is enabled in the bios. HKLM\SYSTEM\CurrentControlSet\Services\NDIS\Parameters\AllowWakeFromS5 REG_DWORD 00000001 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0000\EnablePME REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0001\EnablePME REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power\HiberbootEnabled REG_DWORD 00000000 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0000\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0001\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0001\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0003\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0004\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0005\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0006\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0007\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0008\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0009\PnPCapabilities REG_DWORD 00000024 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0000\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0001\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0002\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0003\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0004\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0005\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0006\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0007\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0008\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0009\S5WakeOnLan REG_SZ 1 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0000\WolSpeed REG_SZ 0 HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0001\WolSpeed REG_SZ 0 1
masond Posted February 4, 2020 Posted February 4, 2020 using Impero still does the job it just needs the latest drivers to be installed
CHiLL Posted February 4, 2020 Posted February 4, 2020 A note about drivers - we have found that when Windows auto-installs Intel LAN drivers, they aren't feature-full...they're pretty basic and don't include the WOL capabilities. We had to deploy out (and include them in the SCCM Task Sequence) the specific drivers obtained from Intel/device manufacturer website. Then the option for WOL was there. 2
Bionic Posted February 4, 2020 Posted February 4, 2020 We use Group Policy to create a scheduled task on our computers to shutdown at 7pm. Our computers are all Windows 10 and startup in under a minute, so there is no need to have the computers switch on automatically in the morning. 1
sbrade47 Posted February 4, 2020 Posted February 4, 2020 Also using Impero and no issues with W10 WOL. I created an SCCM Configuration Item ages ago and it's worked fine ever since. This is then added to the general Configuration Baseline for workstations. Give me a shout if you want a copy and I'll export it.
DrBeaker Posted February 4, 2020 Posted February 4, 2020 We use Group Policy to create a scheduled task on our computers to shutdown at 7pm. Our computers are all Windows 10 and startup in under a minute, so there is no need to have the computers switch on automatically in the morning. It does strike me these days, that machines being started in the morning for staff by WOL is purely due to how long the old computers used to take to boot up. But the practice hadn't changed much. Like you say with an SSD a decent spec machine is a couple of minutes at most. Made me realise how some staff had been mollycoddled when one of them asked me how to switch their computer on - as for years it was already switched on for them when they came in in the morning.
ITGURU Posted February 4, 2020 Posted February 4, 2020 I found with Windows 10 you need to manually install the latest LAN drivers for your machine, then in device manager enable WOL as it's not on by default. Never found a way to do this automatically. Don't bother with this anymore as we rebuild machines each summer, way too much work to do this! How many machines and what are you using to image?
dapaulio Posted February 4, 2020 Posted February 4, 2020 I use group policy task schedule to shutdown each night. Leave the users to turn them back on in the morning
mavhc Posted February 4, 2020 Posted February 4, 2020 Would be great if people who've written these shutdown scripts would share them. But don't you configure your machines to sleep? Are they really on all day while idle?
MartinT Posted February 5, 2020 Posted February 5, 2020 How have you done that then of of interest? Just set it to run if nobody is logged on? Otherwise wouldn't it shutdown every machine in a classroom. e.g. we have an OU per classroom with one computer in some of them. So it would shut them down too surely, if the classroom OUs has been set as a target? I'm just curious. It shuts the machines down at 22:00 precisely, giving a warning to any user logged in about a minute beforehand to allow them to save their work (which with O365 happens regularly anyway). These are the computer suites and classroom computers.
dapaulio Posted February 7, 2020 Posted February 7, 2020 Would be great if people who've written these shutdown scripts would share them. But don't you configure your machines to sleep? Are they really on all day while idle? Yes On all day because stupid users see a blank screen press the power button to find it then shutdown. Group policy task schedule to run cmd at 19:00 every night Shutdown -s -t 600 -c time to go home. Good night No Wol as then the computer are only switched on if they are needed
mavhc Posted February 8, 2020 Posted February 8, 2020 Why is your power button set to shut down the computer, just set the power button to go into standby, set the computer to standby after 10-30 mins, set screen blank to a similar time. I'm amazed everyone's computers aren't going into standby, that's where all your money/pollution is being wasted. It's 2020 you know, we're in the future
dapaulio Posted February 9, 2020 Posted February 9, 2020 Why is your power button set to shut down the computer, just set the power button to go into standby, set the computer to standby after 10-30 mins, set screen blank to a similar time. I'm amazed everyone's computers aren't going into standby, that's where all your money/pollution is being wasted. It's 2020 you know, we're in the future Power button operation was set to do nothing when pressed as students found ways or interrupting live on screen tests by pressing the power button. On screen test vendors like Pearson used to stipulate that the computers never sleep as this had also a tendency of interrupting live examination. They then later found they could hold the power down for 5 seconds still. We do what we do to effectively deliver the curriculum and make lives as easy as possible. Sometimes it dirty and not always best practice but we in education have to deal with the assorts of idiotic systems and their users and expect to deliver it yesterday. It frustrating as hell but I agree we are in the future now and someone needs to tell the education sector that.
mavhc Posted February 9, 2020 Posted February 9, 2020 They won't learn if you hold their hand every moment of every day. If the pupil turns the computer off in the middle of their exam they fail, same as if they walk out of a written exam. 1
MartinT Posted February 10, 2020 Posted February 10, 2020 I'm amazed everyone's computers aren't going into standby, that's where all your money/pollution is being wasted. It's 2020 you know, we're in the future Because sleep and hybrid sleep are problematic on many machines, not waking them up properly. Secondly, because I want every machine to have one power cycle every night in order to install Windows updates.
mrbios Posted February 10, 2020 Posted February 10, 2020 If the pupil turns the computer off in the middle of their exam they fail Tell that to senior management who are criticised by parents and ofsted based on results performance, sure that'll go down well. Fact is in education you're generally expected in IT to do everything you can to ensure least interruption and least distraction. Ensuring students stay focused on the teacher, if that means having computers awake all day, so be it. The usage of electricity isn't an environmental problem anyway, it's how it's generated that's the issue.
mavhc Posted February 10, 2020 Posted February 10, 2020 Tell that to senior management who are criticised by parents and ofsted based on results performance, sure that'll go down well. Fact is in education you're generally expected in IT to do everything you can to ensure least interruption and least distraction. Ensuring students stay focused on the teacher, if that means having computers awake all day, so be it. The usage of electricity isn't an environmental problem anyway, it's how it's generated that's the issue. Do they also lock the doors to the exam room? Student refusing to do work is not an IT problem. Computer sleeping while program that needs it not to sleep is a programming problem, the program should be calling https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate to prevent that, basic Windows API, if they can't do that why would you trust the programmers to write a critical exam program? Usage of electricity is an environmental problem until 100% of energy needs are from renewable sources. No point kids passing exams when they'll have to live in the future we're apparently trying to destroy for them
DarkMaster Posted July 14, 2020 Posted July 14, 2020 we use a batch file for different sets of pcs, running from a scheduled task on a dc with %windir%\system32\shutdown.exe /s /m \\machine-name /f /t 0
dubsdj Posted July 20, 2020 Posted July 20, 2020 I shut down the PC's using GPO preferences. I don't bother waking them up anymore, not since the dawn of SSD's.
Wubbalubbadub Posted July 20, 2020 Posted July 20, 2020 I shut down the PC's using GPO preferences. I don't bother waking them up anymore, not since the dawn of SSD's.This..
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