{"id":3607,"date":"2013-12-27T10:38:13","date_gmt":"2013-12-27T15:38:13","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=3607"},"modified":"2013-12-27T10:38:13","modified_gmt":"2013-12-27T15:38:13","slug":"friday-fun-does-anyone-really-know-what-time-it-is","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/","title":{"rendered":"Friday Fun: Does Anyone Really Know What Time It Is?"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/eternalclock_150x150.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-3608\" alt=\"eternalclock_150x150\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/eternalclock_150x150.png\" width=\"150\" height=\"150\" \/><\/a> In PowerShell it is brain-dead easy to get the date and time with Get-Date. If you look through articles I've posted you'll find plenty of examples using Get-Date and the [DateTime] object. But now that we're getting ready for a new year, I thought you might be planning ahead and might want a few shortcuts for datetime elements like month or day names.<\/p>\n<p>There are no cmdlets for these things so you'll have to rely on some .NET techniques, but don't worry. You don't have to give up being an IT Pro. The steps are very easy, even if it looks a bit foreign to you. First, let's get the days of the week. These are nicely stored in a .NET class called DayOftheWeek which is an Enum. That's just a fancy way of saying a \"list\". Here's how you can list the \"list\".<\/p>\n<pre class=\"lang:batch decode:true\">PS C:\\&gt; [enum]::GetValues([dayofweek])\r\nSunday\r\nMonday\r\nTuesday\r\nWednesday\r\nThursday\r\nFriday\r\nSaturday<\/pre>\n<p>Pretty cool. I don't have a system running PowerShell in a different language but I'm assuming these values will reflect your culture. As far as I know this should work in any version of PowerShell. What can you do with this? Maybe you need a folder for each day of the week.<\/p>\n<pre class=\"lang:ps decode:true\">[enum]::GetValues([dayofweek]) | foreach {\r\n  mkdir \"c:\\work\\$_\"\r\n}<\/pre>\n<p>I took each value and added it to C:\\Work to create the corresponding daily folder. Next, let's figure out how to do with month names.<\/p>\n<p>Unfortunately, there is no Enum class for month names. But, the information is part of a globalization class which corresponds to your computer culture. Here's how it works for me.<\/p>\n<pre class=\"lang:batch decode:true\">PS C:\\&gt; [System.Globalization.DateTimeFormatInfo]::CurrentInfo.MonthNames\r\n\r\nJanuary\r\nFebruary\r\nMarch\r\nApril\r\nMay\r\nJune\r\nJuly\r\nAugust\r\nSeptember\r\nOctober\r\nNovember\r\nDecember<\/pre>\n<p>Again, non-English systems should get months in your language. There is one slight bug with this. For some reason there is a mysterious 13th month with no name.<\/p>\n<pre class=\"lang:batch decode:true \" >\r\nPS C:\\&gt; [System.Globalization.DateTimeFormatInfo]::CurrentInfo.MonthNames | measure\r\n\r\nCount    : 13\r\nAverage  : \r\nSum      : \r\nMaximum  : \r\nMinimum  : \r\nProperty : <\/pre>\n<p>To get around this, simply filter for values.<\/p>\n<pre class=\"lang:ps decode:true \" >[System.Globalization.DateTimeFormatInfo]::CurrentInfo.MonthNames | where {$_} <\/pre>\n<p>We can use the same technique to create a set of monthly folders as well.<\/p>\n<pre class=\"lang:ps decode:true \" >\r\n[System.Globalization.DateTimeFormatInfo]::CurrentInfo.MonthNames |\r\nwhere { $_ } | foreach -begin { mkdir C:\\Work\\2014 } -process {\r\n  mkdir \"c:\\work\\2014\\$_\"\r\n}<\/pre>\n<p>I piped each month name to ForEach-Object. In the begin scriptblock I created a top-level year folder and in the process scriptblock a folder for each month. Or perhaps you'd like to avoid hardcoded values like 2014 or include the year in the folder name.<\/p>\n<pre class=\"lang:ps decode:true \" >\r\n[System.Globalization.DateTimeFormatInfo]::CurrentInfo.MonthNames |\r\nwhere { $_ } |\r\nforeach -begin {$yr = (Get-Date).year} -process { mkdir \"c:\\work\\$_`_$yr\" }<\/pre>\n<p>Here I'm getting the current year in the Begin block and then appending it to the folder name. If I run this today I will end up with a folder like C:\\Work\\January_2013. Note that because I used an underscore, I had to escape it.<\/p>\n<p>Finally, if you prefer abbreviated months you can do that as well.<\/p>\n<pre class=\"lang:ps decode:true \" >[System.Globalization.DateTimeFormatInfo]::CurrentInfo.AbbreviatedMonthNames | \r\nwhere { $_ } |\r\nforeach -begin {$yr = (Get-Date).year} -process { mkdir \"c:\\work\\$_`_$yr\" }<\/pre>\n<p>Here too you have to filter out the mysterious null month. <\/p>\n<p>So plan ahead for next year and I hope it is a great one for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In PowerShell it is brain-dead easy to get the date and time with Get-Date. If you look through articles I&#8217;ve posted you&#8217;ll find plenty of examples using Get-Date and the [DateTime] object. But now that we&#8217;re getting ready for a new year, I thought you might be planning ahead and might want a few shortcuts&#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":"A New Friday Fun: Does Anyone Really Know What Time It Is?  http:\/\/wp.me\/p1nF6U-Wb #PowerShell","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,8],"tags":[70,568,534,540],"class_list":["post-3607","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-scripting","tag-datetime","tag-friday-fun","tag-powershell","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun: Does Anyone Really Know What Time It Is? &#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\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun: Does Anyone Really Know What Time It Is? &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"In PowerShell it is brain-dead easy to get the date and time with Get-Date. If you look through articles I&#039;ve posted you&#039;ll find plenty of examples using Get-Date and the [DateTime] object. But now that we&#039;re getting ready for a new year, I thought you might be planning ahead and might want a few shortcuts...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2013-12-27T15:38:13+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/eternalclock_150x150.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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun: Does Anyone Really Know What Time It Is?\",\"datePublished\":\"2013-12-27T15:38:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/\"},\"wordCount\":457,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/12\\\/eternalclock_150x150.png\",\"keywords\":[\"DateTime\",\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/\",\"name\":\"Friday Fun: Does Anyone Really Know What Time It Is? &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/12\\\/eternalclock_150x150.png\",\"datePublished\":\"2013-12-27T15:38:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/#primaryimage\",\"url\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/12\\\/eternalclock_150x150.png\",\"contentUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/12\\\/eternalclock_150x150.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3607\\\/friday-fun-does-anyone-really-know-what-time-it-is\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun: Does Anyone Really Know What Time It Is?\"}]},{\"@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: Does Anyone Really Know What Time It Is? &#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\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun: Does Anyone Really Know What Time It Is? &#8226; The Lonely Administrator","og_description":"In PowerShell it is brain-dead easy to get the date and time with Get-Date. If you look through articles I've posted you'll find plenty of examples using Get-Date and the [DateTime] object. But now that we're getting ready for a new year, I thought you might be planning ahead and might want a few shortcuts...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/","og_site_name":"The Lonely Administrator","article_published_time":"2013-12-27T15:38:13+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/eternalclock_150x150.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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun: Does Anyone Really Know What Time It Is?","datePublished":"2013-12-27T15:38:13+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/"},"wordCount":457,"commentCount":2,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/eternalclock_150x150.png","keywords":["DateTime","Friday Fun","PowerShell","Scripting"],"articleSection":["Friday Fun","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/","name":"Friday Fun: Does Anyone Really Know What Time It Is? &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/eternalclock_150x150.png","datePublished":"2013-12-27T15:38:13+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/#primaryimage","url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/eternalclock_150x150.png","contentUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/eternalclock_150x150.png"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3607\/friday-fun-does-anyone-really-know-what-time-it-is\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun: Does Anyone Really Know What Time It Is?"}]},{"@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":3374,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3374\/friday-fun-get-friday-the-13th\/","url_meta":{"origin":3607,"position":0},"title":"Friday Fun: Get Friday the 13th","author":"Jeffery Hicks","date":"September 13, 2013","format":false,"excerpt":"I thought it might be fun today to use PowerShell to discover all the Friday the 13ths in a given year. So I put together a simple PowerShell one-liner. To make it flexible I'll use a variable for the year, using the current year as my value. $year = (Get-date).Year\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":5850,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5850\/extending-powershell-datetime-objects\/","url_meta":{"origin":3607,"position":1},"title":"Extending PowerShell DateTime Objects","author":"Jeffery Hicks","date":"December 28, 2017","format":false,"excerpt":"I've been experimenting more with my PSTypeExtensionTools module, finding more objects to enhance.\u00a0 You can check out the project on Github and install the module from the PowerShell Gallery. My current fun has been with the DateTime object \u2013 specifically converting a value into another culture.\u00a0 Apparently those of us\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-13.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-13.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-13.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":976,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/","url_meta":{"origin":3607,"position":2},"title":"Friday Fun &#8211; More Prompts","author":"Jeffery Hicks","date":"October 22, 2010","format":false,"excerpt":"Not too long ago I offered up a tasting of PowerShell prompts 3 ways. My first offering were variations on displaying the current date and time. But a PowerShell prompt can do much more. For today's Friday Fun I present a duo of of calculating prompts. The first item on\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\/2010\/10\/timetogo-prompt-300x142.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":3607,"position":3},"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":928,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/928\/powershell-ise-insert-datetime\/","url_meta":{"origin":3607,"position":4},"title":"PowerShell ISE Insert DateTime","author":"Jeffery Hicks","date":"September 15, 2010","format":false,"excerpt":"I still don't leverage the PowerShell Integrated Script Editor (ISE) as much as I should. But after reading a few recent entries from The Scripting Guys on inserting help and headers into a script, I thought I'd dig in a little more. I've a few things to share but today\u2026","rel":"","context":"In &quot;PowerShell ISE&quot;","block_context":{"text":"PowerShell ISE","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-ise\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5172,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5172\/friday-fun-timing-is-everything\/","url_meta":{"origin":3607,"position":5},"title":"Friday Fun: Timing is Everything","author":"Jeffery Hicks","date":"July 8, 2016","format":false,"excerpt":"For today's fun I want to introduce you to a PowerShell project I've been working on. As with many of these Friday Fun projects this is something that is hardly groundbreaking but it could be fun to use and hopefully serves an educational purpose.\u00a0 What I have is a module\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"Find my PowerShell timer variables","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/07\/image_thumb-3.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3607","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=3607"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3607\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=3607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=3607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=3607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}