Use this forum to share with the community the template or session tool you have created.
10/1/2011 2:04:08 AM
 Onno Meijer Posts: 3
|
Hi,
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.
Script:
@echo off
setlocal enabledelayedexpansion set ip= set hwaddr=
for /F "tokens=* skip=2" %%H in ('nslookup %1 2^>NUL') do ( set line=%%H if "!line:~0,8!"=="Address:" set ip=!line:~10! if "!line:~0,10!"=="Addresses:" set ip=!line:~12! ) set hwaddr=%2 set hwaddr=%hwaddr::=%
c:\scripts\poweroff.exe wol -ip %ip% -subnet 255.255.255.0 -mac %hwaddr% edited by olmeijer on 10/1/2011
|
|
0
• permalink
|
10/1/2011 6:17:27 AM
 David Hervieux Administrator Posts: 4241
|
Hi, 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?
-- David Hervieux Devolutions inc.

|
|
0
• permalink
|