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: http://www.computerworld.jp/topics/mws/180709.html

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

【リスト11:WakeOnLan.ps1】
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:    http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Leave a Comment
  • Please add 1 and 7 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:

    http://www.computerworld.jp/topics/mws/179549.html

Page 1 of 1 (1 items)