Kaseya Community

Wake on Lan

  • Would you be able to post your script glbaxter?



    tia



    Dustin



    edit: Found it in the forums under Tools



    http://community.kaseya.com/xsp/f/132/t/10187.aspx



    For anyone else ^

    Legacy Forum Name: How-To,
    Legacy Posted By Username: quicktech
  • If the NIC is integrated into the motherboard, should you need a jumper? We have some older PC's with Intel Motherboard and integrated RealTek NIC's that have a BIOS option, but the Link Light doesn't stay on when powered off. There appears to be a jumper on the card and NIC but no "connector" or cable. Where might we find a connector/cable?

    Thanks!

    Legacy Forum Name: How-To,
    Legacy Posted By Username: billmccl
  • billmccl
    If the NIC is integrated into the motherboard, should you need a jumper? We have some older PC's with Intel Motherboard and integrated RealTek NIC's that have a BIOS option, but the Link Light doesn't stay on when powered off. There appears to be a jumper on the card and NIC but no "connector" or cable. Where might we find a connector/cable?

    Thanks!


    IF the NIC is integrated into the system board, no jumper is needed. Add-in NICs need the short cable to connect the WOL on the NIC to the system board.

    hc

    Legacy Forum Name: How-To,
    Legacy Posted By Username: howardc
  • even though i am also struggling to get it working but still i can show you the way to keep LAN card light on.

    Double click you Lan card on system tray>>
    click properties>>
    Click configure>>
    Click power management>>

    and ensure no check box is checked

    Legacy Forum Name: How-To,
    Legacy Posted By Username: rajeevsharma
  • rajeevsharma
    even though i am also struggling to get it working but still i can show you the way to keep LAN card light on.

    Double click you Lan card on system tray>>
    click properties>>
    Click configure>>
    Click power management>>

    and ensure no check box is checked


    Here's a VBScript that helps automate that. There's an attribute to the author. I don't remember when or where I acquired this.

    Note that because I'm enclosing this in CODE tags, there will be no extraneous spaces placed within the text of the script! Smile

    '************************************************************************
    '* VBS Script to:
    '* Enable/Disable showing the icon in your system tray for connected NICs
    '* Enable/Disable Power Management for Connected NICs
    '*
    '* 8 MAY 06 - Jase McCarty
    '************************************************************************

    'Let's setup our variables
    Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE info for registry writes
    Dim objReg 'Registry Object
    Dim objWMIService 'WMI Service Object
    Dim arrayNetCards 'Array of all connected NICs
    Dim objNetCard 'A specific NIC
    Dim strNICguid '
    Dim strShowNicKeyName 'Key Specific to the Network Adapters in CurrentControlSet
    Dim strShowNicKeyName001 'Key Specific to the Network Adapters in CurrentControlSet001
    Dim strPnPCapabilitesKeyName 'Key Specific to the Network Adapters in CurrentControlSet
    Dim strPnPCapabilitesKeyName001 'Key Specific to the Network Adapters in CurrentControlSet001
    Dim strComputer 'Name of computer to modify


    strComputer = "." 'Period = local computer

    strShowNicKeyName = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\"
    strShowNicKeyName001 = "SYSTEM\CurrentControlSet001\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\"
    strPnPCapabilitiesKeyName = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\"
    strPnPCapabilitiesKeyName001 = "SYSTEM\CurrentControlSet001\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\"

    ShowNicdwValue = 0 '1 for ON, 0 for OFF

    PnPdwValue = 56 '56 to disable "Allow the computer to turn off this device to save power."

    '48 to enable "Allow the computer to turn off this device to save power."

    '32 to enable "Allow the computer to turn off this device to save power."
    ' and enable "Allow this device to bring the computer out of standby."

    '288 to enable "Allow the computer to turn off this device to save power."
    ' and enable "Allow this device to bring the computer out of standby."
    ' and enable "Only allow management stations to bring the computer out of standby."


    On Error Resume Next
    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
    Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    'Look for the NICs that have IP enabled
    Set arrayNetCards = objWMIService.ExecQuery ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")

    'Make changes on the NICs that have IP enabled
    For Each objNetCard in arrayNetCards
    strNICguid = objNetCard.SettingID 'Get the GUID of the NIC
    strDeviceID = Mid(objNetCard.Caption,6,4) 'Get the DeviceID of the NIC

    'Change the "Show icon in notification area when connected value"
    objReg.SetDWORDValue HKLM, strShowNicKeyName & strNICguid & "\Connection", "ShowIcon", ShowNicdwValue
    objReg.SetDWORDValue HKLM, strShowNicKeyName001 & strNICguid & "\Connection", "ShowIcon", ShowNicdwValue

    'Change the Power Management Values
    objReg.SetDWORDValue HKLM, strPnPCapabilitiesKeyName & strDeviceID & "\","PnPCapabilities",PnPdwValue
    objReg.SetDWORDValue HKLM, strPnPCapabilitiesKeyName001 & strDeviceID & "\","PnPCapabilities",PnPdwValue
    Next

    Set objReg = Nothing
    Set objWMIService = Nothing


    Michael

    Legacy Forum Name: How-To,
    Legacy Posted By Username: RCS-Michael
  • I take it that this script needs to be run on each workstation for this to work?

    I'd also like to follow up on this issue as we are about to roll our own WOL with our clients. Here, then, are some questions:

    1. How old can the systems be before this process can be considered unreliable?

    2. Can WOL only be enabled for PCI NICs if the cable is connected properly to the mainboard?

    3. Do all integrated NICs support WOL?

    4. Do I need to turn on WOL on both the NIC and in the BIOS?

    5. Has anyone else successfully used the Dell Configuration tool with non-Dell systems? Does it work with Phoenix BIOS devices or just specific models?

    Lets try to get all of these questions answered so we have a final resource on this. Just to clarify, Wake-On-LAN and vPro are different technologies. WOL is a feature which was developed by Phoenix as an offering to network admins to simplify remote administration. The NIC people picked up on it and started offering it.

    vPro, on the other hand, is an Intel initiative which places a small System-On-Chip into the computer which can directly control the hardware via a remote interface. Since it is (I believe) integrated into the power supply it is always running and can more effectively turn on a system from a simple command over the network.

    I do and do not look forward to vPro, though. From what I understand each machine must be manually configured. I'm sure that's not true, though, since neither Dell nor HP would offer something to enterprise clients which required extensive manual tweaking.

    Would they?

    Thanks!

    Legacy Forum Name: How-To,
    Legacy Posted By Username: tregas
  • wol.zip
    If you need to "light up" one machine, and want to do it by name instead of looking up the MAC address, here's a script I wrote that does the job nicely.
    Also, it's a good introduction to getting variables from the database Smile

    All you have to do is edit the script to contain the full machineid.groupid of the machine you want to wake up, and run it on another machine on the same LAN that is already awake. (obviously the machine to be woken up needs to support wake-on-lan, which has already been discussed above).

    Also, keep in mind it might not work if run from Vista/Win7/Server 2008 because of changes Microsoft has made to the network stacks of those OSes (although it should be able to wake up a machine that is running one of those OSes, since the WoL is happening before the OS is even loaded)

    Script Name: Wake on LAN - Specify machine within script
    Script Description:

    IF True
    THEN
    Get Variable
    Parameter 1 : 11
    Parameter 2 : vMachine/MacAddr/machineid.groupid
    Parameter 3 : mactowake
    OS Type : 0
    Execute Shell Command
    Parameter 1 : for /f "tokens=1,2,3,4,5,6 delims=- " %a in ("#mactowake#") do echo %a%b%c%d%e%f >> #vAgentConfiguration.agentTempDir#\mactowake.txt
    Parameter 2 : 1
    OS Type : 0
    Get Variable
    Parameter 1 : 1
    Parameter 2 : #vAgentConfiguration.agentTempDir#\mactowake.txt
    Parameter 3 : wakemac
    OS Type : 0
    Write File
    Parameter 1 : #vAgentConfiguration.agentTempDir#\tools\wol.exe
    Parameter 2 : VSASharedFiles\CMDLineUtils\wol.exe
    OS Type : 0
    Execute Shell Command
    Parameter 1 : #vAgentConfiguration.agentTempDir#\tools\wol.exe #wakemac#
    Parameter 2 : 1
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : Tried to wake machine with MAC address #mactowake# #wakemac#
    OS Type : 0
    ELSE



    Note the attached .zip file contains an executable that will run as a CLI or as a GUI... also note that it doesn't like the MAC address to be in : or - format, so a little batch-magic was needed to strip out the dashes that are returned by the Kaseya DB.

    Also note, in machines with multiple NICs (like laptops with wireless and wired, both connected) this may not work well, or at all; but it works reliably with several desktop machines I've tested on (HP, Dell, and some but not all of the "generic" (aka asus, gigabyte, etc.) motherboards with integrated NIC)

    Legacy Forum Name: How-To,
    Legacy Posted By Username: Matthew Bartels