

$CollectionName = ‘Target collection name goes here’ Start-Transcript -path C:\Scripts\Log\wolreboot.txt The script uses the free wol.exe program from Gammadnye and is expecting to run from C:\Scripts\ but you can change that to whatever you like without breaking anything.ĭownload the script here (rename to. It doesn’t incorporate the forced reboot, but should be modifiable to achieve that result. I’ll also note that Adam Bertram wrote a different WOL script that will find each subnet and use any PC it can find to send WOL commands to other computers which is worth checking out. You need to use an account that has access on all servers required of course to be able to remotely trigger the scheduled tasks. This master task triggers all the WOL scripts, on a schedule or on demand as you wish. Then, a master task is created that calls the task on each of the other servers: Each server is configured to check the SCCM collection of computers that exist in that subnet. This only works in a single subnet though, so the next trick is to set this up on a server in each subnet as a scheduled task. It will leave all computers at the login screen, ready for software installs. This is valuable to me for software installs that require no user logged onto a computer. If offline, it will send a WOL magic packet to the computer.If online, it will trigger a reboot countdown of 5 minutes, with a warning prompt.Checks each computer to see if it’s online.

