I'm using a utility poweroff.exe to send a WOL packet to a remote subnet to wake up a selected pc. I have a small script which I use to wake up individual pc's (see below). I need to know if and how I can run this script for a pc which is defined in my session list. I also need to know if there is a variable I can use for the mac address located in the computer information in RDM. Any help would be appreciated!
BTW: if have added a policy to allow UDP port 9 from my subnet to the remote subnet on the security device at the remote subnet to make this work.
for /F "tokens=* skip=2" %%H in ('nslookup %1 2^>NUL') do (
if "!line:~0,8!"=="Address:" set ip=!line:~10!
if "!line:~0,10!"=="Addresses:" set ip=!line:~12! )
c:\scripts\poweroff.exe wol -ip %ip% -subnet 255.255.255.0 -mac %hwaddr%
<em>edited by olmeijer on 10/1/2011</em>
I think that you can use the variable $HOST$ in command line parameters of the Session Script Tools. It will be replaced by the session host. The only problem I see is that I haven't defined a variable for the MAC. I will add this and it's very simple. Could you send me an email and I will send you a special build so you can test it?