browolf Posted March 11, 2011 Posted March 11, 2011 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.
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