Follow us on LinkedIn Find us on YouTube
home recent topics recent posts search faq  

Devolutions inc. > Forum

user:
psw:
| register | lost password   open id
Messages in this topic - RSS

Home » Remote Desktop Manager - Session Script Tools » WOL script using poweroff.exe / RDM variables

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
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
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

Home » Remote Desktop Manager - Session Script Tools » WOL script using poweroff.exe / RDM variables





Powered by Jitbit Forum 7.0.4.0 © 2006-2011 Jitbit Software