3

I have a handful of workstations and a Windows Server 2008 R2 in the same LAN. The workstations show up in the server's Active Directory. Is there a way to wake them up manually from the server when they're powered off?

entonio
  • 185
  • 1
  • 1
  • 8

2 Answers2

5

You can use Powershell to send a wake-on-lan magic packet from the server if the workstations are setup for WOL. This can also be used to wake the workstations at a specific time by running the script via the windows task scheduler if required.

Heres a sample script below from: http://gallery.technet.microsoft.com/scriptcenter/Send-WOL-packet-using-0638be7b

Usage:

Send-WOL -mac 00:11:32:21:2D:11 -ip 192.168.8.255 -port 7

Script:

function Send-WOL 
{ 

    <#  
      .SYNOPSIS   
       Send a WOL packet to a broadcast address 
      .PARAMETER mac 
       The MAC address of the device that need to wake up 
      .PARAMETER ip 
       The IP address where the WOL packet will be sent to 
      .EXAMPLE  
       Send-WOL -mac 00:11:32:21:2D:11 -ip 192.168.8.255  
    #> 

    param( 
    [string]$mac, 
    [string]$ip, 
    [int]$port=9 
    ) 

    $broadcast = [Net.IPAddress]::Parse($ip) 

    $mac=(($mac.replace(":","")).replace("-","")).replace(".","") 
    $target=0,2,4,6,8,10 | % {[convert]::ToByte($mac.substring($_,2),16)} 
    $packet = (,[byte]255 * 6) + ($target * 16) 

    $UDPclient = new-Object System.Net.Sockets.UdpClient 
    $UDPclient.Connect($broadcast,$port) 
    [void]$UDPclient.Send($packet, 102)  


} 
Alexander Lai
  • 1,907
  • 13
  • 4
1

I can think of commercial products that do that--including Deep Freeze Enterprise and Altiris Deployment Solution--but I'm unaware of any such functionality built into Active Directory Users and Computers. Before buying something new, check the software you already own for this feature.

Katherine Villyard
  • 18,510
  • 4
  • 36
  • 59