{"id":6065,"date":"2018-08-15T12:14:26","date_gmt":"2018-08-15T16:14:26","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=6065"},"modified":"2018-08-15T12:14:26","modified_gmt":"2018-08-15T16:14:26","slug":"converting-powershell-to-markdown","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/","title":{"rendered":"Converting PowerShell to Markdown"},"content":{"rendered":"<p>I have been working a lot with markdown documents over the last year or so, primarily due to all the books I've been working on published at Leanpub.com. With the growing use of markdown in projects like <a title=\"checkout the project or install from the PowerShell Gallery\" href=\"https:\/\/github.com\/powershell\/platyps\" target=\"_blank\" rel=\"noopener\">Platyps<\/a> for generating help files and documentation, you will most likely be using markdown at some point. With that in mind, I decided to write a PowerShell function that would take pipeline output and convert it to a simple markdown document, following the same model as <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113290\" target=\"_blank\" rel=\"noopener\">ConvertTo-HTML<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>Learning markdown basics takes about 10 minutes. And even then, you don\u2019t have to know anything about markdown to use my function. ConvertTo-Markdown is designed to take pipelined input and convert it to a code-fenced section of a markdown document. If you don\u2019t know what this means, don\u2019t worry about it. The function assumes you will want to include a top-level title. Although, this isn\u2019t required if you are building a document with markdown fragments. I\u2019ll show you an example later.<\/p>\n<p>You\u2019ll need to grab a copy of the function from <a href=\"https:\/\/gist.github.com\/jdhitsolutions\/c92fab5b7077799e4ba5da920f0679f0\" rel=\"noopener\" target=\"_blank\">GitHub<\/a>.<\/p>\n<p>https:\/\/gist.github.com\/jdhitsolutions\/c92fab5b7077799e4ba5da920f0679f0<\/p>\n<p>Once loaded in your session, you can pipe a command to the convert function.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image_thumb-1.png\" alt=\"image\" width=\"644\" height=\"290\" border=\"0\" \/><\/a><\/p>\n<p>Like ConvertTo-HTML this doesn\u2019t create a file. It only converts to markdown. Pipe the command to <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113363\" target=\"_blank\" rel=\"noopener\">Out-File<\/a> or <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113392\" target=\"_blank\" rel=\"noopener\">Set-Content<\/a>.<\/p>\n<p>The function also lets you add markdown to display before and after the converted pipeline output.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">get-service win* | \r\nConvertTo-Markdown -Title \"Win* Services\" -PreContent \"## $env:computername\" -PostContent \"_$(Get-Date)_\" | \r\nOut-File c:\\work\\winsvc.md\r\n<\/pre>\n<p>Here\u2019s the end result:<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image_thumb-2.png\" alt=\"image\" width=\"644\" height=\"305\" border=\"0\" \/><\/a><\/p>\n<p>Where I think this will come in handy is when you want to create documentation. Here is a proof of concept script.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">#SystemMarkdownReport.ps1\r\n\r\nparam(\r\n[string]$Title = \"System Configuration Report\",\r\n[string]$Computername = $env:COMPUTERNAME,\r\n[ValidatePattern('\\.md$')]\r\n[string]$Filepath = \"SystemReport.md\"\r\n)\r\n\r\n. C:\\scripts\\Convertto-Markdown.ps1\r\n\r\n$PSDefaultParameterValues.add(\"Get-Ciminstance:computername\",$computername)\r\n\r\n$pre = @\"\r\n\r\nThis is a system configuration report for $($computername.toupper())\r\n\"@\r\n\r\n$fragments = @()\r\n\r\n$fragments+= ConvertTo-Markdown -Title $title -PreContent $pre\r\n\r\n#Computersystem\r\n$prop = 'Manufacturer','Model','SystemFamily','SystemSKUNumber','SystemType','NumberOfLogicalProcessors','NumberofProcessors','TotalPhysicalMemory' \r\n$cs = Get-CimInstance Win32_Computersystem -ov c -Property $prop | Select-Object -Property $prop \r\n\r\n$class = ($c.cimclass.cimclassname.split(\"_\")[1])\r\n$fragments+= $cs | ConvertTo-Markdown -precontent \"## $class\"\r\n\r\n#volumes\r\n$vol = Get-CimInstance win32_volume -ov c| Select-Object Name,Label,Freespace,Capacity | Format-List\r\n$class = ($c.cimclass.cimclassname.split(\"_\")[1])\r\n$fragments+= $vol | ConvertTo-Markdown -precontent \"## $class\"\r\n\r\n#processor\r\n$cpu = Get-CimInstance win32_processor -ov c | \r\nSelect-Object DeviceID,Name,Caption,MaxClockSpeed,*CacheSize,NumberOf*,SocketDesignation,*Width,Manufacturer\r\n$class = ($c.cimclass.cimclassname.split(\"_\")[1])\r\n$fragments+= $cpu | ConvertTo-Markdown -PreContent \"## $class\"\r\n\r\n#memory\r\n$mem = Get-CimInstance win32_physicalmemory -ov c| Select-Object BankLabel,Capacity,DataWidth,Speed\r\n$class = ($c.cimclass.cimclassname.split(\"_\")[1])\r\n$fragments+= $mem | ConvertTo-Markdown -precontent \"## $class\"\r\n\r\n#networkadapter\r\n$net = Get-NetAdapter -Physical -ov c | Select-Object Name,InterfaceDescription,LinkSpeed\r\n$class=\"NetworkAdapter\"\r\n$fragments+= $net | ConvertTo-Markdown -precontent \"## $class\"\r\n\r\n&lt;#\r\n#system drivers\r\n$sysdrv = Get-CimInstance win32_systemdriver -ov c -filter \"State='running'\" | \r\nSelect-Object Name,Description,State,StartMode,Started,Pathname,ServiceType | Sort State,Caption\r\n$class = ($c.cimclass.cimclassname.split(\"_\")[1])\r\n$fragments+= $sysdrv | ConvertTo-Markdown -precontent \"## $class\"\r\n#&gt;\r\n\r\n$fragments+= ConvertTo-Markdown -postcontent \"_report run $(Get-Date)_\"\r\n\r\n$fragments | out-file -FilePath $filepath\r\n<\/pre>\n<p>The final markdown isn\u2019t always perfect so expect to make some minor adjustments.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/SystemReport.png\" alt=\"Markdown system report\" \/><\/p>\n<p>And here is one more example of creating a more complex markdown document.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">. C:\\scripts\\Convertto-Markdown.ps1\r\n\r\n$computers = \"srv1\",\"srv2\",\"srv4\"\r\n$Title = \"System Report\"\r\n$footer = \"_report run $(Get-Date) by $($env:USERDOMAIN)\\$($env:USERNAME)_\"\r\n\r\n$sb =  {\r\n$os = get-ciminstance -classname win32_operatingsystem -property caption,lastbootUptime\r\n[PSCustomObject]@{\r\n    PSVersion = $PSVersionTable.PSVersion\r\n    OS = $os.caption\r\n    Uptime = (Get-Date) - $os.lastbootUpTime\r\n    SizeFreeGB = (Get-Volume -DriveLetter C).SizeRemaining \/1GB\r\n}\r\n}\r\n\r\n$out = Convertto-Markdown -title $Title -PreContent \"Here is the system summary information you requested.\"\r\nforeach ($computer in $computers) {\r\n $out+= Invoke-command -scriptblock $sb -ComputerName $computer -HideComputerName |\r\n Select-Object -Property * -ExcludeProperty RunspaceID |\r\n ConvertTo-Markdown -PreContent \"## $($computer.toUpper())\"\r\n}\r\n$out += ConvertTo-Markdown -PostContent $footer\r\n$out | set-content c:\\work\\report.md<\/pre>\n<p><img decoding=\"async\" title=\"another complex markdown report\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/report.png\" alt=\"markdown-systemreport\" \/><\/p>\n<p>I hope you\u2019ll give the function a try and let me know what you think. And if you want to share any online tutorials for learning basic markdown, that would be terrific. Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been working a lot with markdown documents over the last year or so, primarily due to all the books I&#8217;ve been working on published at Leanpub.com. With the growing use of markdown in projects like Platyps for generating help files and documentation, you will most likely be using markdown at some point. With&#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":"Finally some new blog content: Converting #PowerShell to Markdown","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],"tags":[595,534,540],"class_list":["post-6065","post","type-post","status-publish","format-standard","hentry","category-powershell","tag-markdown","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 PowerShell to Markdown &#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\/6065\/converting-powershell-to-markdown\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Converting PowerShell to Markdown &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I have been working a lot with markdown documents over the last year or so, primarily due to all the books I&#039;ve been working on published at Leanpub.com. With the growing use of markdown in projects like Platyps for generating help files and documentation, you will most likely be using markdown at some point. With...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-15T16:14:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image_thumb-1.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\\\/6065\\\/converting-powershell-to-markdown\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Converting PowerShell to Markdown\",\"datePublished\":\"2018-08-15T16:14:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/\"},\"wordCount\":338,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/image_thumb-1.png\",\"keywords\":[\"markdown\",\"PowerShell\",\"Scripting\"],\"articleSection\":[\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/\",\"name\":\"Converting PowerShell to Markdown &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/image_thumb-1.png\",\"datePublished\":\"2018-08-15T16:14:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/image_thumb-1.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/image_thumb-1.png\",\"width\":644,\"height\":290},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6065\\\/converting-powershell-to-markdown\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Converting PowerShell to Markdown\"}]},{\"@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 PowerShell to Markdown &#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\/6065\/converting-powershell-to-markdown\/","og_locale":"en_US","og_type":"article","og_title":"Converting PowerShell to Markdown &#8226; The Lonely Administrator","og_description":"I have been working a lot with markdown documents over the last year or so, primarily due to all the books I've been working on published at Leanpub.com. With the growing use of markdown in projects like Platyps for generating help files and documentation, you will most likely be using markdown at some point. With...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/","og_site_name":"The Lonely Administrator","article_published_time":"2018-08-15T16:14:26+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image_thumb-1.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\/6065\/converting-powershell-to-markdown\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Converting PowerShell to Markdown","datePublished":"2018-08-15T16:14:26+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/"},"wordCount":338,"commentCount":0,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image_thumb-1.png","keywords":["markdown","PowerShell","Scripting"],"articleSection":["PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/","name":"Converting PowerShell to Markdown &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image_thumb-1.png","datePublished":"2018-08-15T16:14:26+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image_thumb-1.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/image_thumb-1.png","width":644,"height":290},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6065\/converting-powershell-to-markdown\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Converting PowerShell to Markdown"}]},{"@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":6161,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/","url_meta":{"origin":6065,"position":0},"title":"Friday Fun: PowerShell Thriller Revisited","author":"Jeffery Hicks","date":"November 16, 2018","format":false,"excerpt":"A number of years ago I shared a fun PowerShell script that generated a description of a new thriller you might find in the action thriller section of your local book store. I modeled it after the works of authors like Vince Flynn, Ben Coes and James Rollins. I'm a\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\/2018\/11\/image_thumb-3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-3.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-3.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7865,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7865\/tracing-powershell-with-wpf\/","url_meta":{"origin":6065,"position":1},"title":"Tracing PowerShell with WPF","author":"Jeffery Hicks","date":"November 11, 2020","format":false,"excerpt":"Back in my VBScript days, I had a script that would use Internet Explorer as a trace window. My script could run and messages would be written to an IE window. This was a handy way of separating debug or trace messages from the command output. When PowerShell came along\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\/2020\/11\/trace-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/11\/trace-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/11\/trace-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/11\/trace-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7638,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7638\/friday-fun-a-powershell-nonsense-challenge\/","url_meta":{"origin":6065,"position":2},"title":"Friday Fun &#8211; A PowerShell Nonsense Challenge","author":"Jeffery Hicks","date":"August 7, 2020","format":false,"excerpt":"Today I thought I'd share my PowerShell solution to a recent Iron Scripter challenge. The challenge was to create PowerShell code that would create nonsense documents, with a goal of creating 10 sample files filled with gibberish. Yes, other than maybe wanting some test files to work with, on its\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\/2020\/08\/nnp.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/08\/nnp.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/08\/nnp.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/08\/nnp.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/08\/nnp.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":5734,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5734\/sending-files-to-your-browser-with-powershell\/","url_meta":{"origin":6065,"position":3},"title":"Sending Files to Your Browser with PowerShell","author":"Jeffery Hicks","date":"November 6, 2017","format":false,"excerpt":"Over the course of the last year I've been using markdown files much more, especially as part of the Platyps module. Even though I have a markdown editor and I can also preview files in VS Code, sometimes I want to see the file in my browser which has a\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7599,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7599\/updating-powershell-about-help\/","url_meta":{"origin":6065,"position":4},"title":"Updating PowerShell About Help","author":"Jeffery Hicks","date":"July 17, 2020","format":false,"excerpt":"During some recent work, I realized my new Windows PowerShell 5.1 installs are missing the About help topics. Apparently, this is a known issue, although I don't think it gets a lot of attention. Microsoft is working on improving updateable help for PowerShell 7 which I think will also have\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\/2020\/07\/download-abouthelp.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/download-abouthelp.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/download-abouthelp.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/download-abouthelp.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":9343,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9343\/github-scripting-challenge-solution\/","url_meta":{"origin":6065,"position":5},"title":"GitHub Scripting Challenge Solution","author":"Jeffery Hicks","date":"March 7, 2024","format":false,"excerpt":"Earlier this year I appeared on the PowerShell Podcast. I ended the interview with a scripting challenge. The Core Challenge Using whatever tools and techniques you want, write a PowerShell function that will query the Issues section of a GitHub repository and create output showing the number of open issues\u2026","rel":"","context":"In &quot;GitHub&quot;","block_context":{"text":"GitHub","link":"https:\/\/jdhitsolutions.com\/blog\/category\/github\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6065","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=6065"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6065\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}