Smiling, Crying, and Scripting

Smiling, Crying, and Scripting

  • Comments 1

I once heard that everyone in the world smiles and cries the same way - that language and culture had no effect on these.

I thought of that when I navigated to:

I have ABSOLUTELY no clue what they are saying but in the middle of the article I saw this:

1 param($MacAddress) 
2 [byte[]] $MagicPacket = 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
3 $MagicPacket += (($MacAddress.split('-') | foreach {[byte] 
('0x' + $_)}) * 16)
4 $UdpClient = New-Object System.Net.Sockets.UdpClient
5 $UdpClient.Connect(([System.Net.IPAddress]::Broadcast) ,9)
6 $UdpClient.Send($MagicPacket,$MagicPacket.length)


I guess everyone in the world scripts the same way too. 

Given that they are scripting in PowerShell, I bet they are also smiling!  :-)

Experiment!  Enjoy!  Engage!

Jeffrey Snover [MSFT]
Distinguished Engineer
Visit the Windows PowerShell Team blog at:
Visit the Windows PowerShell ScriptCenter at:

Leave a Comment
  • Please add 7 and 2 and type the answer here:
  • Post
  • The title of the article is roughly "Automated Power Management #2, Restarting the Computer at a Scheduled Time"

    It's second in a series, the first one (covers shutting it down) is here:

Page 1 of 1 (1 items)