Wake On Lan
hi
I need to get wake on lan up and running on around 2000pcs, all either Dell or HP with XP SP3 to be able to deploy software updates/packages at night.
Now i've managed to turn it on in the bios using Dell's DCCU and HP's SSM but I need to enable it in device manger.
PCs are running either a broadcom or intel nics (intel's have proset installed)
I've found a couple scripts but they didnt really work that great.
Anyone able to help out??
I need to get wake on lan up and running on around 2000pcs, all either Dell or HP with XP SP3 to be able to deploy software updates/packages at night.
Now i've managed to turn it on in the bios using Dell's DCCU and HP's SSM but I need to enable it in device manger.
PCs are running either a broadcom or intel nics (intel's have proset installed)
I've found a couple scripts but they didnt really work that great.
Anyone able to help out??
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
ckought
14 years ago
Posted by:
Lucid
14 years ago
See if this VBScript code snippet helps.....
' ~$~----------------------------------------~$~
Sub SetWindowsPowerManagementForWOL
'Configuring the needed Wake-On-LAN power management settings within Microsoft Windows
Dim colWin32_NetworkAdapters, objNetworkAdapter, strNetworkAdapterID, colPowerWakeEnables, objPowerWakeEnable
Dim strDevInstanceName, colMagicPacketOnlys, objMagicPacketOnly
'Obtaining all of the MSPower_DeviceWakeEnable classes
Set colPowerWakeEnables = GetObject("WinMgmts:{impersonationLevel=impersonate}//./root/wmi").ExecQuery("SELECT * FROM MSPower_DeviceWakeEnable")
'Obtaining all of the MSNdis_DeviceWakeOnMagicPacketOnly classes
Set colMagicPacketOnlys = GetObject("WinMgmts:{impersonationLevel=impersonate}//./root/wmi").ExecQuery("SELECT * FROM MSNdis_DeviceWakeOnMagicPacketOnly")
'Obtaining all of the wired ethernet adapters (AdapterTypeID ""0"" is for Ethernet 802.3)
Set colWin32_NetworkAdapters = GetObject("WinMgmts:{impersonationLevel=impersonate}//./root/Cimv2").ExecQuery("SELECT * FROM Win32_NetworkAdapter WHERE AdapterTypeId=0")
For Each objNetworkAdapter in colWin32_NetworkAdapters
strNetworkAdapterID = UCase(objNetworkAdapter.PNPDeviceID)
For Each objPowerWakeEnable In colPowerWakeEnables
strDevInstanceName = UCase(Left(objPowerWakeEnable.InstanceName, Len(strNetworkAdapterID)))
'Comparing the PNP Device ID from the network adapter to the MSPower_DeviceEnabled instances (uses the leftmost part because MSPower_DeviceEnabled.InstanceName contains an instance suffix)
If StrComp(strDevInstanceName, strNetworkAdapterID) = 0 Then
'Setting objPowerWakeEnable.Enable to TRUE
objPowerWakeEnable.Enable = True
objPowerWakeEnable.Put_
End If
Next
For Each objMagicPacketOnly in colMagicPacketOnlys
strDevInstanceName = UCase(Left(objMagicPacketOnly.InstanceName, Len(strNetworkAdapterID)))
'Comparing the PNP Device ID from the network adapter to the MSNdis_DeviceWakeOnMagicPacketOnly instances (uses the leftmost part because MSNdis_DeviceWakeOnMagicPacketOnly.InstanceName contains an instance suffix)
If StrComp(strDevInstanceName, strNetworkAdapterID)=0 Then
'Setting objMagicPacketOnly.EnableWakeOnMagicPacketOnly to TRUE
objMagicPacketOnly.EnableWakeOnMagicPacketOnly = True
objMagicPacketOnly.Put_
End If
Next
Next
End Sub
Sub SetWindowsPowerManagementForWOL
'Configuring the needed Wake-On-LAN power management settings within Microsoft Windows
Dim colWin32_NetworkAdapters, objNetworkAdapter, strNetworkAdapterID, colPowerWakeEnables, objPowerWakeEnable
Dim strDevInstanceName, colMagicPacketOnlys, objMagicPacketOnly
'Obtaining all of the MSPower_DeviceWakeEnable classes
Set colPowerWakeEnables = GetObject("WinMgmts:{impersonationLevel=impersonate}//./root/wmi").ExecQuery("SELECT * FROM MSPower_DeviceWakeEnable")
'Obtaining all of the MSNdis_DeviceWakeOnMagicPacketOnly classes
Set colMagicPacketOnlys = GetObject("WinMgmts:{impersonationLevel=impersonate}//./root/wmi").ExecQuery("SELECT * FROM MSNdis_DeviceWakeOnMagicPacketOnly")
'Obtaining all of the wired ethernet adapters (AdapterTypeID ""0"" is for Ethernet 802.3)
Set colWin32_NetworkAdapters = GetObject("WinMgmts:{impersonationLevel=impersonate}//./root/Cimv2").ExecQuery("SELECT * FROM Win32_NetworkAdapter WHERE AdapterTypeId=0")
For Each objNetworkAdapter in colWin32_NetworkAdapters
strNetworkAdapterID = UCase(objNetworkAdapter.PNPDeviceID)
For Each objPowerWakeEnable In colPowerWakeEnables
strDevInstanceName = UCase(Left(objPowerWakeEnable.InstanceName, Len(strNetworkAdapterID)))
'Comparing the PNP Device ID from the network adapter to the MSPower_DeviceEnabled instances (uses the leftmost part because MSPower_DeviceEnabled.InstanceName contains an instance suffix)
If StrComp(strDevInstanceName, strNetworkAdapterID) = 0 Then
'Setting objPowerWakeEnable.Enable to TRUE
objPowerWakeEnable.Enable = True
objPowerWakeEnable.Put_
End If
Next
For Each objMagicPacketOnly in colMagicPacketOnlys
strDevInstanceName = UCase(Left(objMagicPacketOnly.InstanceName, Len(strNetworkAdapterID)))
'Comparing the PNP Device ID from the network adapter to the MSNdis_DeviceWakeOnMagicPacketOnly instances (uses the leftmost part because MSNdis_DeviceWakeOnMagicPacketOnly.InstanceName contains an instance suffix)
If StrComp(strDevInstanceName, strNetworkAdapterID)=0 Then
'Setting objMagicPacketOnly.EnableWakeOnMagicPacketOnly to TRUE
objMagicPacketOnly.EnableWakeOnMagicPacketOnly = True
objMagicPacketOnly.Put_
End If
Next
Next
End Sub
Posted by:
igorvinnykov
12 years ago
First of all you have to enable WOL in BIOS and NIC. As ckought said, it's a manual task to configure these settings. Once you are done, you can use any free script or tool to initiate wake up. We preffer this tool, because it's free and allows us to collect MAC addresses from remote PCs easily: http://emcosoftware.com/wake-on-lan
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.