{"id":478,"date":"2009-11-05T13:48:56","date_gmt":"2009-11-05T18:48:56","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=478"},"modified":"2009-11-05T13:52:31","modified_gmt":"2009-11-05T18:52:31","slug":"is-it-friday-yet","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/","title":{"rendered":"Is It Friday Yet?"},"content":{"rendered":"<p>Some days the week just seems to drag on and on and on\u2026.Like many of you, I can\u2019t wait for the end of the work day on Friday afternoon. But how much longer is it until I can say, in a cliche ridden fashion, \u201cTGIF!\u201d Fortunately I have PowerShell to give me a pretty accurate answer. <!--more--><\/p>\n<p>I wote a simple script, Get-TGIF.ps1, which lets me know how much longer I have to wait. Or if the weekend has started, that I\u2019d better get going.<\/p>\n<div id=\"codeSnippetWrapper\" style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\">\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #008000\">#get Friday 5:00PM for the current week<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\">$now=Get-Date<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\">[datetime]$TGIF=<span style=\"color: #006080\">\"{0:MM\/dd\/yyyy} 5:00:00 PM\"<\/span> -f (($now.AddDays( 5 - [int]$now.DayOfWeek)) )<\/pre>\n<p><!--CRLF--><\/p>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #0000ff\">if<\/span> ((get-date) <span style=\"color: #cc6633\">-ge<\/span> $TGIF) {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\"> write-host <span style=\"color: #006080\">\"TGIF has started without you!\"<\/span> -fore Green<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\"> }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #0000ff\">else<\/span> {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\">   write-host <span style=\"color: #006080\">\"Countdown: $( ($tgif -(get-date)).ToString()  )\"<\/span> -fore magenta<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\"> }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 10pt; overflow: visible; border-style: none; padding: 0px;\"> #<span style=\"color: #0000ff\">end<\/span> script<\/pre>\n<p><!--CRLF--><\/div>\n<\/div>\n<p>The script is an example of a countdown. It gets the current date and time and saves it to $now. Then it creates a timespan object subtracting the current date and time from 5:00PM on Friday for the current week. But how do I know when that will be?<\/p>\n<p>In order to properly define the $TGIF variable, I need to get the date for the next Friday. I can do this by using the integer value of the DayOfWeek property which normally just gives you the day.<\/p>\n<p><span style=\"font-family: 'Lucida Console'; color: #0000ff;\">PS C:\\&gt; (get-date).DayOfWeek<br \/>\nThursday<\/span><\/p>\n<p>However, each value has an underlying integer value.<\/p>\n<p><span style=\"font-family: 'Lucida Console'; color: #0000ff;\">PS C:\\&gt; (get-date).DayOfWeek -as [int]<br \/>\n4<\/span><\/p>\n<p>Depending on your culture or regional settings you might have a different value. Usually Monday is day 1 which means Friday is 5. Therefore I simply have to subtract the current day value from 5 and then I\u2019ll know the date of the current week\u2019s Friday.<\/p>\n<p>If the current time is greater than $TGIF then I know it\u2019s after 5:00PM on Friday and I should be doing something else. Otherwise, the script writes a message to the host displaying the timespan object as a string.\u00a0 I even created an alias, tgif, for the script so I can easily see how much longer I have.<\/p>\n<p>Certainly you can change the deadline to whatever time you prefer and customize the messages.<\/p>\n<div id=\"scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:a042fb12-aba8-42de-aaca-5c4445e6c21c\" class=\"wlWriterEditableSmartContent\" style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\">\n<div><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2009\/11\/gettgif.txt\" target=\"_blank\">Download the script<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Some days the week just seems to drag on and on and on\u2026.Like many of you, I can\u2019t wait for the end of the work day on Friday afternoon. But how much longer is it until I can say, in a cliche ridden fashion, \u201cTGIF!\u201d Fortunately I have PowerShell to give me a pretty accurate&#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":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[61,4,8],"tags":[125,534,540,126],"class_list":["post-478","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","category-powershell","category-scripting","tag-get-date","tag-powershell","tag-scripting","tag-timespan"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Is It Friday Yet? &#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\/478\/is-it-friday-yet\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Is It Friday Yet? &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Some days the week just seems to drag on and on and on\u2026.Like many of you, I can\u2019t wait for the end of the work day on Friday afternoon. But how much longer is it until I can say, in a cliche ridden fashion, \u201cTGIF!\u201d Fortunately I have PowerShell to give me a pretty accurate...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2009-11-05T18:48:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2009-11-05T18:52:31+00:00\" \/>\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\\\/478\\\/is-it-friday-yet\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/478\\\/is-it-friday-yet\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Is It Friday Yet?\",\"datePublished\":\"2009-11-05T18:48:56+00:00\",\"dateModified\":\"2009-11-05T18:52:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/478\\\/is-it-friday-yet\\\/\"},\"wordCount\":322,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"keywords\":[\"Get-Date\",\"PowerShell\",\"Scripting\",\"TimeSpan\"],\"articleSection\":[\"Miscellaneous\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/478\\\/is-it-friday-yet\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/478\\\/is-it-friday-yet\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/478\\\/is-it-friday-yet\\\/\",\"name\":\"Is It Friday Yet? &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2009-11-05T18:48:56+00:00\",\"dateModified\":\"2009-11-05T18:52:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/478\\\/is-it-friday-yet\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/478\\\/is-it-friday-yet\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/478\\\/is-it-friday-yet\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Miscellaneous\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/miscellaneous\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Is It Friday Yet?\"}]},{\"@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":"Is It Friday Yet? &#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\/478\/is-it-friday-yet\/","og_locale":"en_US","og_type":"article","og_title":"Is It Friday Yet? &#8226; The Lonely Administrator","og_description":"Some days the week just seems to drag on and on and on\u2026.Like many of you, I can\u2019t wait for the end of the work day on Friday afternoon. But how much longer is it until I can say, in a cliche ridden fashion, \u201cTGIF!\u201d Fortunately I have PowerShell to give me a pretty accurate...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/","og_site_name":"The Lonely Administrator","article_published_time":"2009-11-05T18:48:56+00:00","article_modified_time":"2009-11-05T18:52:31+00:00","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\/478\/is-it-friday-yet\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Is It Friday Yet?","datePublished":"2009-11-05T18:48:56+00:00","dateModified":"2009-11-05T18:52:31+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/"},"wordCount":322,"commentCount":4,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"keywords":["Get-Date","PowerShell","Scripting","TimeSpan"],"articleSection":["Miscellaneous","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/","name":"Is It Friday Yet? &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"datePublished":"2009-11-05T18:48:56+00:00","dateModified":"2009-11-05T18:52:31+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/478\/is-it-friday-yet\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Miscellaneous","item":"https:\/\/jdhitsolutions.com\/blog\/category\/miscellaneous\/"},{"@type":"ListItem","position":2,"name":"Is It Friday Yet?"}]},{"@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":4169,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4169\/friday-fun-updated-ise-scripting-geek-module\/","url_meta":{"origin":478,"position":0},"title":"Friday Fun: Updated ISE Scripting Geek Module","author":"Jeffery Hicks","date":"January 9, 2015","format":false,"excerpt":"A few years ago I published a module with a number of functions and enhancements for the PowerShell ISE. This ISEScriptingGeek module has remained popular over the last few years. But I wrote it for PowerShell v2. I have also come up with a number of new additions to 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":"geek","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/geek-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1347,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1347\/friday-fun-the-scripting-geek-is-here\/","url_meta":{"origin":478,"position":1},"title":"Friday Fun The Scripting Geek is Here","author":"Jeffery Hicks","date":"April 15, 2011","format":false,"excerpt":"I am proud (and a wee bit nervous) to announce the arrival of ScriptingGeek.com, a site devoted to the lifestyle of your favorite scripting geek - you! My goal is to provide a one stop shop for anything scripting related. Currently www.ScriptingGeek.com will direct you to an online store that\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\/2011\/04\/scriptinggeekurl-blue-300x39.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3377,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3377\/friday-fun-get-day-of-the-year-with-powershell\/","url_meta":{"origin":478,"position":2},"title":"Friday Fun: Get Day of the Year with PowerShell","author":"Jeffery Hicks","date":"August 30, 2013","format":false,"excerpt":"Earlier this week I was having some fun with @EnergizedTech on Twitter, playing around with dates in PowerShell. I'm not even sure where we started but the experience got me thinking and it's Friday so let's have some fun. While I can easily find out what the day of 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":"calendar","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/08\/calendar.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4220,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/4220\/friday-the-13th-fun\/","url_meta":{"origin":478,"position":3},"title":"Friday the 13th Fun","author":"Jeffery Hicks","date":"February 13, 2015","format":false,"excerpt":"It is that time of year again. But instead of being freaked out by Friday the 13th, let's have a little fun. Here is a collection of PowerShell one-liners, all celebrating 13. And maybe you'll even pick up something new about PowerShell. #13^13 [math]::Pow(13,13) #get the 13 letter from [CHAR]\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\/2013\/12\/friday13.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/friday13.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/friday13.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/friday13.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":826,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/826\/friday-the-13-script-blocks\/","url_meta":{"origin":478,"position":4},"title":"Friday the 13 Script Blocks","author":"Jeffery Hicks","date":"August 13, 2010","format":false,"excerpt":"In celebration of Friday the 13th and to help ward off any triskaidekaphobia I thought I'd offer up 13 PowerShell scriptblocks. These are scriptblocks that might solve a legitimate business need like finding how long a server has been running to the more mercurial such as how many hours before\u2026","rel":"","context":"In &quot;PowerShell v2.0&quot;","block_context":{"text":"PowerShell v2.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-v2-0\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":91,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/91\/windows-powershell-tfm-out-of-stock\/","url_meta":{"origin":478,"position":5},"title":"Windows PowerShell: TFM Out of stock","author":"Jeffery Hicks","date":"January 23, 2007","format":false,"excerpt":"Amazon is again showing that Windows PowerShell: TFM is unavailable. Apparently they sold out of the initial order of books. Last I knew, SAPIEN Press was waiting for Amazon to place a re-order. Given the time it takes to ship books it could be a bit before Amazon gets re-stocked.\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/478","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=478"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/478\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}