Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

using wolcmd

Depicus Wake On Lan Command Line

 

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
rem %1 is input room prefix

del temp.txt
set mac=
set ip=

dsquery computer -limit 5000 dc=domain,dc=lancs,dc=sch,dc=uk | find "%1" /I >> temp.txt

for /f "tokens=2 delims==," %%a in ('type temp.txt') do ( 

if exist \\server\share\macs\%%a.log for /f "tokens=* delims= " %%b in ('type \\server\share\macs\%%a.log') do set mac=!mac! %%b

wolcmd !MAC! %%a.domain.lancs.sch.uk 255.255.0.0 7
set mac=
set ip=

)
del temp.txt

ENDLOCAL

 

requires common room prefixes, some means to know mac addresses. we have log files.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...