Wednesday, April 18, 2007

SMS 2003 and Wake on Lan


UPDATE: This post is by far the most popular of my blog. If it does you some good, consider hitting the Paypal link on the right and buying me a Diet-Coke. Or two. Also, I'm doing the vast majority of my technical blogging over at MyITForum these days. Check it out.

One of the things we've missed after moving from Zen to SMS 2003 is Wake on Lan. For those of you not in the tech world, this gives us the ability to remotely turn on a computer using it's network connection. It's endlessly handy for patching and other things that might take a while, or just need to be done after hours.

I was flabbergasted to learn that SMS 2003 did not have Wake on Lan built in. The next version, System Center Configuration Manager, does have it. We've had WOL in Zen for years and years.

There are companies that offer WOL capabilities as an add-on to SMS. But another client on the workstation and another expense are just out of the question.

So I found, over at the great MyITForum site, some contextual add-ons for SMS that were free, and one of the was Wake-On-Lan. Hooray!

Alas, the wake-on-lan only worked on it's own subnet. Not good enough for me.

I found a free WOL utility from SolarWinds that purported to be able to WOL across subnets. I tried it out and it worked like a champ. But could it be scripted, in the same way that the contextual add-ons scripted the other utility?

A quick reg check and I found the portion where the other utility enumerates it's command line to link into the magicpacket program. A simple edit of that reg key yeilded a working result. Here's the exported .reg for the edited key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\NodeTypes\{4D26C0D4-A8A8-11D1-9BD9-00C04FBBD480}\Extensions\SMS_Tools\310]

"Description"="Use the SolarWinds WOL to wake up the client."

"CommandLine"="cmd /C \"c:\\Program Files\\SolarWinds\\Free Tools\\WakeOnLAN.exe\" -IP ##SUB:IPAddresses## -MAC ##SUB:MACAddresses##"

"CriteriaMessage"="Unable to find ##SUB:MACAddresses##"

"Name"="WakeUp""CriteriaQuery"="select * from SMS_R_SYSTEM where ResourceID = ##SUB:ResourceID##"

So with the SolarWinds Wakeonlan.exe installed in the default location, I get Wake On Lan capability across subnets from the SMS console for free.

Up next: figuring out how to Wake a collection.





8 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

Great tool.. I got it to work except for when sms reports 2 IP's for a system.
Not sure why this happens but something I have systems where the IP address field is "0.0.0.0","X.X.X.X"
X represents the real IP.
I cannot get wake to work on those because it seems to be sending wake on lan both the IP's.
Is there a way to program it to only send 1?

Unknown said...

Actually I figured out why I have 2 ip's. I have systems with 2 nics.
1 is disabled.

How can we get wake on lan to just pull 1 of the Ip's instead of both?

Or is this not possible?

pwstrain said...

I have hundreds of systems with two nics (laptops with wireless) and haven't seen this issue, but I'll look into it.

Unknown said...

Actually the laptops are reporting 2 IP's and it works fine now.

My problem is a few of my desktops report 2 ip's (they have only 1 nic) 1 IP is 0.0.0.0 and this is what causes the problem with wake on lan.
Not sure but it must be just a setting in my SMS.

I'm looking forward to see if you can get it working with collections.
Waking 1 computer a time is kinda slow if you need to wake about 300 of them!

I'm guessing the only way that would work is if you can get a script going to start wake on lan for each IP and MAC. I don't think you can input more then 1 at a time.

Anonymous said...

Wake on LAN/WOL/PME, Magic Paket

Hello ;-)

I have changed the SMS Add on to work with wolcmd which seemd to work cross Subnet, Cross Cisco (if Cisco config correct) and works perfect with HP Procurve and Netgear Switches. We do SMS 2003 consulting in Switzerland.

M. Butsch

Just copy below to a a text file like sms.reg, Double Click on you SMS Admin Console machine. And put the wolcmd.exe into c:\windows\system32. (You can get wolcmd.exe if you look in google). It's freware and runs perfect.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\NodeTypes\{4D26C0D4-A8A8-11D1-9BD9-00C04FBBD480}\Extensions\SMS_Tools\310]

"Description"="IBITECH AG WOL Waker"

"CommandLine"="cmd /C \"c:\\windows\\system32\\wolcmd\" ##SUB:MACAddresses## ##SUB:IPAddresses## 255.255.255.255"

"CriteriaMessage"="Unable to find ##SUB:MACAddresses##"

"Name"="IBITECH AG WOL Waker"

"CriteriaQuery"="select * from SMS_R_SYSTEM where ResourceID = ##SUB:ResourceID##"

Anonymous said...

Any luck in getting the solar winds tool to work on waking a collection?

San Diego funeral services said...

Great post,very informative.
Please continue to write more
interesting post in your blog.

San Diego funeral services

Useful SCCM Links

Compiled this info for a client, thought I would post it here. I will try to keep it updated. Tutorials. Windows-Noob ( https...