{"id":2981,"date":"2010-05-06T20:58:18","date_gmt":"2010-05-06T20:58:18","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2010\/05\/06\/smiling-crying-and-scripting\/"},"modified":"2019-02-18T13:05:56","modified_gmt":"2019-02-18T20:05:56","slug":"smiling-crying-and-scripting","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/smiling-crying-and-scripting\/","title":{"rendered":"Smiling, Crying, and Scripting"},"content":{"rendered":"<p>I once heard that everyone in the world smiles and cries the same way &#8211; that language and culture had no effect on these.<\/p>\n<p>I thought of that when I navigated to: <a title=\"http:\/\/www.computerworld.jp\/topics\/mws\/180709.html\" href=\"http:\/\/www.computerworld.jp\/topics\/mws\/180709.html\">http:\/\/www.computerworld.jp\/topics\/mws\/180709.html<\/a><\/p>\n<p>I have ABSOLUTELY no clue what they are saying but in the middle of the article I saw this:<\/p>\n<p><code>\u3010\u30ea\u30b9\u30c811\uff1aWakeOnLan.ps1\u3011      <br \/>1 param($MacAddress)&#160; <br \/>2 [byte[]] $MagicPacket = 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF       <br \/>3 $MagicPacket += (($MacAddress.split('-') | foreach {[byte]&#160; <br \/>('0x' + $_)}) * 16)       <br \/>4 $UdpClient = New-Object System.Net.Sockets.UdpClient       <br \/>5 $UdpClient.Connect(([System.Net.IPAddress]::Broadcast) ,9)       <br \/>6 $UdpClient.Send($MagicPacket,$MagicPacket.length)<\/code><\/p>\n<p>&#160;<\/p>\n<p>I guess everyone in the world scripts the same way too.&#160; <\/p>\n<p>Given that they are scripting in PowerShell, I bet they are also smiling!&#160; \ud83d\ude42<\/p>\n<p>Experiment!&#160; Enjoy!&#160; Engage! <\/p>\n<p>Jeffrey Snover [MSFT]   <br \/>Distinguished Engineer    <br \/>Visit the Windows PowerShell Team blog at:&#160;&#160;&#160; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a>    <br \/>Visit the Windows PowerShell ScriptCenter at:&#160; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I once heard that everyone in the world smiles and cries the same way &#8211; 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: \u3010\u30ea\u30b9\u30c811\uff1aWakeOnLan.ps1\u3011 1 param($MacAddress)&#160; [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2981","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>I once heard that everyone in the world smiles and cries the same way &#8211; 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: \u3010\u30ea\u30b9\u30c811\uff1aWakeOnLan.ps1\u3011 1 param($MacAddress)&#160; [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/2981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=2981"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/2981\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=2981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=2981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=2981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}