{"id":4830,"date":"2016-01-22T12:21:55","date_gmt":"2016-01-22T17:21:55","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=4830"},"modified":"2016-01-22T12:21:55","modified_gmt":"2016-01-22T17:21:55","slug":"friday-fun-a-powershell-nap","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/","title":{"rendered":"Friday Fun: A PowerShell Nap"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/antique-watch-150x225.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; float: left; padding-top: 0px; padding-left: 0px; margin: 0px 3px 3px 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"antique-watch-150x225\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/antique-watch-150x225_thumb.png\" alt=\"antique-watch-150x225\" width=\"154\" height=\"229\" align=\"left\" border=\"0\" \/><\/a>I'm hoping that I'm not the only one who feels their butt dragging by mid to late afternoon. Let's say that's because we've been thundering through the day and by 3:00 we're a bit out of gas. Yeah, I'll go with that.<\/p>\n<p>I find myself wanting to close my eyes for only a few minutes to recharge and or at least take the tired edge off.\u00a0 In other words, I just want a quick nap like we had in kindergarten.\u00a0 But I need to make sure I wake up! Since I always have a PowerShell console, I can use it as a quick and dirty alarm clock.<\/p>\n<p>For starters I can use the <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113407\" target=\"_blank\">Start-Sleep<\/a> cmdlet to wait for X number of seconds. So if I want say a 10 minute timer I can run:<\/p>\n<pre class=\"lang:ps decode:true \">start-sleep \u2013seconds 600<\/pre>\n<p>But if my eyes are closed how will know when time is up? A quick solution is to make my computer beep using the [console] .NET class.<\/p>\n<pre class=\"lang:ps decode:true \">[console]::Beep()<\/pre>\n<p>So to run this all at once I can enter a command like this:<\/p>\n<pre class=\"lang:ps decode:true \">start-sleep \u2013seconds 600 ; [console]::Beep()<\/pre>\n<p>The semi-colon is the end of command marker so what I'm really doing here is executing 2 commands. PowerShell will sleep for 600 seconds and when that command completes, then the Beep() method will run.<\/p>\n<p>But of course it is Friday so let's have a bit more fun with this.<\/p>\n<p>The Beep() method can also take 2 parameters. The first is a tone frequency, and the second is a duration in milliseconds.<\/p>\n<pre class=\"lang:ps decode:true \">[console]::Beep(440,1000)<\/pre>\n<p>With this in mind I put together a PowerShell napping script.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">#PowerShellNap.ps1\r\n\r\n#nap time in minutes\r\nParam([int]$Naptime = 1)\r\n\r\n#define the wakeup time\r\n$wake = (Get-Date).AddMinutes($Naptime)\r\n\r\n#loop until the time is &gt;= the wake up time\r\ndo {\r\ncls\r\nWrite-host \"Ssshhhh....\"\r\n\r\n#trim off the milliseconds\r\nwrite-host ($wake - (Get-Date)).ToString().Substring(0,8) -NoNewline\r\n\r\nStart-Sleep -Seconds 1\r\n\r\n} Until ( (Get-Date) -ge $wake)\r\n\r\n#Play wake up music\r\n[console]::Beep(392,1000)\r\n[console]::Beep((329.6*2),1000)\r\n[console]::Beep(523.2,1000)\r\n\r\nWrite-Host \"`nBack to work sleepy head!\" -ForegroundColor Yellow\r\n<\/pre>\n<p>The script takes a parameter for the number of minutes you need to nap. It then writes a message to anyone who might be walking by your desk to keep quiet.\u00a0 The script then does a countdown of sorts by calculating a timespan between the target end time and the current time. I'm writing the value as a string so that I can strip off the milliseconds.<\/p>\n<figure style=\"width: 301px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/image-21.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;\" title=\"image\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/image_thumb-21.png\" alt=\"nap in progress\" width=\"301\" height=\"136\" border=\"0\" \/><\/a><figcaption class=\"wp-caption-text\">nap in progress<\/figcaption><\/figure>\n<p>At the end of the countdown I've recreated a well known chime, at least for those of you in the United States and of a certain age. I'll let you try it out for yourself.<\/p>\n<figure style=\"width: 559px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/image-22.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;\" title=\"image\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/image_thumb-22.png\" alt=\"nap complete\" width=\"559\" height=\"150\" border=\"0\" \/><\/a><figcaption class=\"wp-caption-text\">nap complete<\/figcaption><\/figure>\n<p>So get a bit more work done today,\u00a0 and when you're ready, take a quick PowerShell Power nap.<\/p>\n<pre class=\"lang:ps decode:true \">C:\\scripts\\PowerShellNap.ps1 \u2013naptime 10<\/pre>\n<p>Enjoy and sweet dreams.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m hoping that I&#8217;m not the only one who feels their butt dragging by mid to late afternoon. Let&#8217;s say that&#8217;s because we&#8217;ve been thundering through the day and by 3:00 we&#8217;re a bit out of gas. Yeah, I&#8217;ll go with that. I find myself wanting to close my eyes for only a few minutes&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"New from the blog: Friday Fun: A #PowerShell Nap","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[271,4],"tags":[568,534],"class_list":["post-4830","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","tag-friday-fun","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun: A PowerShell Nap &#8226; The Lonely Administrator<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun: A PowerShell Nap &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I&#039;m hoping that I&#039;m not the only one who feels their butt dragging by mid to late afternoon. Let&#039;s say that&#039;s because we&#039;ve been thundering through the day and by 3:00 we&#039;re a bit out of gas. Yeah, I&#039;ll go with that. I find myself wanting to close my eyes for only a few minutes...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-22T17:21:55+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/antique-watch-150x225_thumb.png\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun: A PowerShell Nap\",\"datePublished\":\"2016-01-22T17:21:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/\"},\"wordCount\":412,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/01\\\/antique-watch-150x225_thumb.png\",\"keywords\":[\"Friday Fun\",\"PowerShell\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/\",\"name\":\"Friday Fun: A PowerShell Nap &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/01\\\/antique-watch-150x225_thumb.png\",\"datePublished\":\"2016-01-22T17:21:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/01\\\/antique-watch-150x225_thumb.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/01\\\/antique-watch-150x225_thumb.png\",\"width\":154,\"height\":229},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4830\\\/friday-fun-a-powershell-nap\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun: A PowerShell Nap\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Friday Fun: A PowerShell Nap &#8226; The Lonely Administrator","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun: A PowerShell Nap &#8226; The Lonely Administrator","og_description":"I'm hoping that I'm not the only one who feels their butt dragging by mid to late afternoon. Let's say that's because we've been thundering through the day and by 3:00 we're a bit out of gas. Yeah, I'll go with that. I find myself wanting to close my eyes for only a few minutes...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/","og_site_name":"The Lonely Administrator","article_published_time":"2016-01-22T17:21:55+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/antique-watch-150x225_thumb.png","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun: A PowerShell Nap","datePublished":"2016-01-22T17:21:55+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/"},"wordCount":412,"commentCount":3,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/antique-watch-150x225_thumb.png","keywords":["Friday Fun","PowerShell"],"articleSection":["Friday Fun","PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/","name":"Friday Fun: A PowerShell Nap &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/antique-watch-150x225_thumb.png","datePublished":"2016-01-22T17:21:55+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/antique-watch-150x225_thumb.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/antique-watch-150x225_thumb.png","width":154,"height":229},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4830\/friday-fun-a-powershell-nap\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun: A PowerShell Nap"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2639,"url":"https:\/\/jdhitsolutions.com\/blog\/friday-fun\/2639\/friday-fun-scraping-the-web-with-powershell-v3\/","url_meta":{"origin":4830,"position":0},"title":"Friday Fun: Scraping the Web with PowerShell v3","author":"Jeffery Hicks","date":"December 21, 2012","format":false,"excerpt":"We often think about PowerShell v3 as being a management tool for the cloud. One new PowerShell v3 cmdlet that lends substance to this idea is Invoke-WebRequest. This is a handy for retrieving data from a web site resource. It might be a public web site or something on your\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4278,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-ise\/4278\/friday-fun-send-powershell-ise-content-to-word\/","url_meta":{"origin":4830,"position":1},"title":"Friday Fun: Send PowerShell ISE Content to Word","author":"Jeffery Hicks","date":"March 13, 2015","format":false,"excerpt":"Yesterday on Facebook, Ed Wilson was lamenting about confusion of keyboard shortcuts between PowerShell and Microsoft Word. I've run into the same issue. Muscle memory is strong. Then the discussion turned to getting content from the PowerShell ISE into a Word document. I humorously suggested we had a plugin and\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"geek","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/geek.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4895,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4895\/friday-fun-a-sysinternals-powershell-workflow\/","url_meta":{"origin":4830,"position":2},"title":"Friday Fun: A SysInternals PowerShell Workflow","author":"Jeffery Hicks","date":"February 12, 2016","format":false,"excerpt":"Over the years I've come up with a number of PowerShell tools to download the SysInternals tools to my desktop. And yes, I know that with PowerShell 5 and PowerShellGet I could download and install a SysInternals package. But that assumes the package is current.\u00a0 But that's not really the\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-5.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-5.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-5.png?resize=525%2C300 1.5x"},"classes":[]},{"id":2880,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2880\/friday-fun-powershell-puzzlers\/","url_meta":{"origin":4830,"position":3},"title":"Friday Fun PowerShell Puzzlers","author":"Jeffery Hicks","date":"March 15, 2013","format":false,"excerpt":"This week's Friday Fun is a short PowerShell puzzler which I hope you'll have some fun with and maybe even lead you to look something up and how knows what that might lead to! The following scrambled terms are all PowerShell related. The ones asterisked are PowerShell 3.0 related, but\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"letterjumble","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/03\/letterjumble-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2787,"url":"https:\/\/jdhitsolutions.com\/blog\/friday-fun\/2787\/friday-fun-a-graphical-powershell-history-picker\/","url_meta":{"origin":4830,"position":4},"title":"Friday Fun A Graphical PowerShell History Picker","author":"Jeffery Hicks","date":"February 8, 2013","format":false,"excerpt":"One of my favorite features in PowerShell 3.0 is that you can select items in Out-Gridview which will then pipe the object back to the pipeline. One way I've been using this is as graphical \"picker\" for command history. I use Get-History, actually its alias h, all the time. Once\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"history-picker","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/02\/history-picker-300x230.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":7134,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7134\/friday-fun-thank-god-its-a-powershell-friday\/","url_meta":{"origin":4830,"position":5},"title":"Friday Fun: Thank God It&#8217;s a PowerShell Friday","author":"Jeffery Hicks","date":"December 27, 2019","format":false,"excerpt":"Well here we are at the last Friday of the year. In fact , the last Friday of the decade! On this auspicious occasion, let's have some PowerShell fun and celebrate Friday. No matter what you call it, I'm assuming Friday is your last typical workday and something we look\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-38.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-38.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-38.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-38.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4830"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4830\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}