{"id":4985,"date":"2016-05-09T08:02:10","date_gmt":"2016-05-09T12:02:10","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=4985"},"modified":"2016-05-09T08:02:10","modified_gmt":"2016-05-09T12:02:10","slug":"converting-text-to-html-revised","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/","title":{"rendered":"Converting Text to HTML Revised"},"content":{"rendered":"<p>A few years ago I published a PowerShell function to <a href=\"http:\/\/jdhitsolutions.com\/blog\/powershell\/3966\/friday-fun-text-to-html\/\" target=\"_blank\">convert text files into HTML listings<\/a>. I thought it would be handy to convert scripts to HTML documents with line numbering and some formatting. Turns out someone actually used it! He had some questions about the function which led me to revisit it and realize there were some improvements to be made.<\/p>\n<p>Part of the challenge with this project is that the function takes an existing text file and creates a much larger text file. On one hand this is to be expected because we are adding HTML to it.\u00a0 But I wanted to find ways to keep the size down.<\/p>\n<p>After some HTML style tweaking, I found a better way to preserve the\u00a0 formatting without dramatically increasing the file size. I also added an option so that you can specify an alternate CSS file. If you don't use one, then the function will insert a default style into the head section. I also gave you the option to specify your own document title.<\/p>\n<p>The revised script, which includes defining an alias, is now a gist on GitHub.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/jdhitsolutions\/c885bb4080512dfc7c6ba79acf9443db.js\"><\/script>The function behaves much like <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113290\" target=\"_blank\">ConvertTo-HTML<\/a> in that it doesn't create an actual file. You still need to pipe the output to <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113363\" target=\"_blank\">Out-File<\/a>.\u00a0 And you should use Out-File instead of the console redirection character (&gt;) as that created a much larger version of the file.<\/p>\n<p>Here's an example of a converted file using the default style sheet.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/convertto-htmllisting2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;\" title=\"convertto-htmllisting2\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/convertto-htmllisting2_thumb.png\" alt=\"convertto-htmllisting2\" width=\"644\" height=\"356\" border=\"0\" \/><\/a><\/p>\n<p>If you want to create your own style sheet, be sure to use the setting white-space:pre; as this should retain document formatting. At least the best it can.<\/p>\n<p>I hope you'll find this helpful. Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few years ago I published a PowerShell function to convert text files into HTML listings. I thought it would be handy to convert scripts to HTML documents with line numbering and some formatting. Turns out someone actually used it! He had some questions about the function which led me to revisit it and realize&#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 today: Converting Text to HTML Revised #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":[4,8],"tags":[237,534,540],"class_list":["post-4985","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","tag-html","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>Converting Text to HTML Revised &#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\/4985\/converting-text-to-html-revised\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Converting Text to HTML Revised &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"A few years ago I published a PowerShell function to convert text files into HTML listings. I thought it would be handy to convert scripts to HTML documents with line numbering and some formatting. Turns out someone actually used it! He had some questions about the function which led me to revisit it and realize...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-09T12:02:10+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/convertto-htmllisting2_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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Converting Text to HTML Revised\",\"datePublished\":\"2016-05-09T12:02:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/\"},\"wordCount\":290,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/05\\\/convertto-htmllisting2_thumb.png\",\"keywords\":[\"HTML\",\"PowerShell\",\"Scripting\"],\"articleSection\":[\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/\",\"name\":\"Converting Text to HTML Revised &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/05\\\/convertto-htmllisting2_thumb.png\",\"datePublished\":\"2016-05-09T12:02:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/05\\\/convertto-htmllisting2_thumb.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/05\\\/convertto-htmllisting2_thumb.png\",\"width\":644,\"height\":356},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4985\\\/converting-text-to-html-revised\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Converting Text to HTML Revised\"}]},{\"@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":"Converting Text to HTML Revised &#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\/4985\/converting-text-to-html-revised\/","og_locale":"en_US","og_type":"article","og_title":"Converting Text to HTML Revised &#8226; The Lonely Administrator","og_description":"A few years ago I published a PowerShell function to convert text files into HTML listings. I thought it would be handy to convert scripts to HTML documents with line numbering and some formatting. Turns out someone actually used it! He had some questions about the function which led me to revisit it and realize...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/","og_site_name":"The Lonely Administrator","article_published_time":"2016-05-09T12:02:10+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/convertto-htmllisting2_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":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Converting Text to HTML Revised","datePublished":"2016-05-09T12:02:10+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/"},"wordCount":290,"commentCount":1,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/convertto-htmllisting2_thumb.png","keywords":["HTML","PowerShell","Scripting"],"articleSection":["PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/","name":"Converting Text to HTML Revised &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/convertto-htmllisting2_thumb.png","datePublished":"2016-05-09T12:02:10+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/convertto-htmllisting2_thumb.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/convertto-htmllisting2_thumb.png","width":644,"height":356},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4985\/converting-text-to-html-revised\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Converting Text to HTML Revised"}]},{"@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":3966,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3966\/friday-fun-text-to-html\/","url_meta":{"origin":4985,"position":0},"title":"Friday Fun Text to HTML","author":"Jeffery Hicks","date":"August 22, 2014","format":false,"excerpt":"I love being able to create HTML documents from PowerShell commands. The Convertto-HTML cmdlet will happily turn any object into an HTML table using whatever properties you specify. Plus you can do all sorts of fancy things such as embedding a style sheet in the header, creating HTML fragments 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":"html","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/08\/html-150x150.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2152,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2152\/create-an-html-powershell-help-page\/","url_meta":{"origin":4985,"position":1},"title":"Create an HTML PowerShell Help Page","author":"Jeffery Hicks","date":"April 3, 2012","format":false,"excerpt":"Yesterday I posted an article about getting the online url for a cmdlet help topic. Today I want to demonstrate how we might take advantage of this piece of information. Since the link is already in the form of a URL, wouldn't it make sense to put this in an\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\/2012\/04\/cmdlethelp-1-300x177.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1384,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1384\/create-a-master-powershell-online-help-page\/","url_meta":{"origin":4985,"position":2},"title":"Create a Master PowerShell Online Help Page","author":"Jeffery Hicks","date":"April 28, 2011","format":false,"excerpt":"As I hope you know, PowerShell cmdlets can include links to online help. This is very handy because it is much easier to keep online help up to date. To see online help for a cmdlet use the -online parameter. get-help get-wmiobject -online I decided to take things to another\u2026","rel":"","context":"In &quot;Miscellaneous&quot;","block_context":{"text":"Miscellaneous","link":"https:\/\/jdhitsolutions.com\/blog\/category\/miscellaneous\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8871,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8871\/more-colorful-fun-with-powershell\/","url_meta":{"origin":4985,"position":3},"title":"More Colorful Fun with PowerShell","author":"Jeffery Hicks","date":"February 14, 2022","format":false,"excerpt":"In my last Friday Fun post, I shared some PowerShell code for displaying [System.Drawing.Color] values from a console using ANSI escape sequences. After I published the article, I realized what I really wanted was a color palette display that wouldn't be affected by the console background. A Windows Presentation Foundation\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\/2022\/02\/textbox-background.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/textbox-background.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/textbox-background.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/textbox-background.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1977,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1977\/the-powershell-morning-report\/","url_meta":{"origin":4985,"position":4},"title":"The PowerShell Morning Report","author":"Jeffery Hicks","date":"January 10, 2012","format":false,"excerpt":"I love how easy it is to manage computers with Windows PowerShell. It is a great reporting tool, but often I find people getting locked into one approach. I'm a big believer in flexibility and re-use and using objects in the pipeline wherever I can. So I put together a\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"Zazu","src":"https:\/\/i0.wp.com\/www.lionking.org\/imgarchive\/Clip_Art\/zazu03.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3627,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3627\/friday-fun-with-rest-regex-and-replacements\/","url_meta":{"origin":4985,"position":5},"title":"Friday Fun with REST, Regex and Replacements","author":"Jeffery Hicks","date":"January 24, 2014","format":false,"excerpt":"I just love using the web cmdlets that were introduced in PowerShell 3.0. One of the cmdlets I use the most is Invoke-RESTMethod. This isn't because I'm dealing with sites that offer REST-ful services, but rather I like that the cmdlet does all the heavy lifting for me when I\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"computereye","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4985","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=4985"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4985\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}