{"id":4407,"date":"2015-05-15T10:34:20","date_gmt":"2015-05-15T14:34:20","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=4407"},"modified":"2015-05-15T10:40:08","modified_gmt":"2015-05-15T14:40:08","slug":"friday-fun-a-powershell-macro","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/","title":{"rendered":"Friday Fun: A PowerShell Macro"},"content":{"rendered":"<p>Today's Friday Fun is a little different in that it showcases two things I use almost every day: Microsoft Word and PowerShell. I am writing new articles and material almost daily and of course very often the content is PowerShell related. Usually I use the blog post template in Word to make it easier to upload. This works great because I can insert links in the Word document and they will be maintained when copied to WordPress. One of the steps I've started taking in my writing is to include a link to online help for a cmdlet.<\/p>\n<p>For example, if I am writing about <a title=\"Read online help for Get-WinEvent\" href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?linkid=289626\" target=\"_blank\">Get-WinEvent<\/a> I'll include a link on the cmdlet name. Of course I'm not going to manually get the link, copy it and create the hyperlink in Word. So I created a Word macro that calls a PowerShell script to get the online link and insert it as a hyperlink. Here's how this all works.<\/p>\n<p>There are a few ways to get the online help link for a given cmdlet. You could retrieve the HelpUri with <a title=\"Read online help for Get-Command\" href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?linkid=289583\" target=\"_blank\">Get-Command<\/a>.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP1.png\" alt=\"\" \/><\/p>\n<p>Or you can retrieve it using Get-Help.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP2.png\" alt=\"\" \/><\/p>\n<p>As you can see the links are different, even though the online content is very similar. But since the latter is what you would get if you ran Get-Help Get-Service \u2013online, I decided to go with that. I put together a simple script.<\/p>\n<pre class=\"lang:ps decode:true \">#requires -version 3.0\r\n\r\n#Get-HelpOnlineUri.ps1\r\n\r\n[cmdletbinding()]\r\n\r\nParam(\r\n[Parameter(Position=0,Mandatory=$True,HelpMessage=\"Enter a command name\")]\r\n[string]$Name\r\n)\r\n\r\nTry {\r\n $help = get-help $name -ErrorAction Stop \r\n if ($help.RelatedLinks) {\r\n [string]$uri = $help | select -expand relatedlinks | select -expand Navigationlink | select -first 1 -expand uri\r\n #trim it just in case there are spaces\r\n $uri.trim()\r\n #send to clipboard as well\r\n $uri.trim() | clip\r\n }\r\n else {\r\n    Write-Warning \"No online help links detected for $name\"\r\n    #write null to the pipeline\r\n    $null\r\n }\r\n \r\n} #try\r\nCatch {\r\n    #write null to the pipeline\r\n    $null\r\n    Throw\r\n    \r\n} #catch<\/pre>\n<p>The function writes the link to the pipeline if found, otherwise it writes $Null. I'll explain why in a moment.<\/p>\n<p>With this script, I now turn to Word and created this macro.<\/p>\n<pre class=\"lang:vb decode:true \">Sub InsertHelpLink()\r\n\r\nDim r, c, file\r\nDim cmd As String\r\nDim link As String\r\nDim tip As String\r\nDim iFile As Integer\r\n\r\n'get the %temp% path\r\ntempdir = CStr(Environ(\"temp\"))\r\n'define a temporary file\r\nfile = tempdir + \"\\uri.txt\"\r\n\r\n'selected text\r\nc = ActiveDocument.ActiveWindow.Selection.Text\r\n\r\nDebug.Print \"Testing for \" + c\r\n'the command to run\r\n'YOU MIGHT NEED TO EDIT SCRIPT PATH\r\ncmd = \"powershell -nologo -noprofile -command \" + Chr(34) + \"&amp;{C:\\scripts\\Get-HelpOnlineUri.ps1 \" + c + \" | out-file \" + file + \" -force -encoding Ascii}\" + Chr(34)\r\nDebug.Print cmd\r\n\r\n'invoke the command\r\nr = shell(cmd, vbHide)\r\n\r\n'wait a few seconds for process to complete and file to close\r\nwait = Now() + TimeValue(\"00:00:02\")\r\nDo While Now &lt; wait\r\nLoop\r\n\r\n'open the file and read its contents\r\niFile = FreeFile()\r\n\r\nOpen file For Input As #iFile\r\n\r\nDo While Not EOF(iFile)\r\n  Line Input #iFile, link\r\nLoop\r\n\r\nClose #iFile\r\nDebug.Print link\r\n\r\n'define the screentip\r\ntip = \"Read online help for \" + c\r\nDebug.Print tip\r\n\r\n'insert the link\r\nIf Len(link) &gt; 0 Then\r\n    ActiveDocument.ActiveWindow.Selection.Hyperlinks.Add Anchor:=Selection.Range, Address:=link, SubAddress:=\"\", _\r\n        ScreenTip:=tip, TextToDisplay:=c, Target:=\"_blank\"\r\nElse\r\nDebug.Print \"no link found\"\r\nEnd If\r\n\r\nEnd Sub<\/pre>\n<p>I couldn't find a way to capture the output of the PowerShell command so I ended up creating a temporary file that contains the link. If nothing was found then the file will have a 0 length. I found this easier because the macro reads the file and saves the contents to a variable, <em>link<\/em>. If the length of <em>link<\/em> is &gt; 0 then Word inserts the hyperlink, complete with a constructed screen tip.<\/p>\n<p>I stored the macro in Normal.dot so I always have it available.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP3.png\" alt=\"\" \/><\/p>\n<p>I even gave it a keyboard shortcut under File - Options \u2013Customize Ribbon<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP4.png\" alt=\"\" \/><\/p>\n<p>Finding ways to automate the dreary tasks from my day is very rewarding, plus I almost always learn something new. Hopefully you did to.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s Friday Fun is a little different in that it showcases two things I use almost every day: Microsoft Word and PowerShell. I am writing new articles and material almost daily and of course very often the content is PowerShell related. Usually I use the blog post template in Word to make it easier to&#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 Friday Fun: A #PowerShell Macro for Microsoft Word","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":[76,534,540,92],"class_list":["post-4407","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-scripting","tag-help","tag-powershell","tag-scripting","tag-word"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun: A PowerShell Macro &#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\/4407\/friday-fun-a-powershell-macro\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun: A PowerShell Macro &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Today&#039;s Friday Fun is a little different in that it showcases two things I use almost every day: Microsoft Word and PowerShell. I am writing new articles and material almost daily and of course very often the content is PowerShell related. Usually I use the blog post template in Word to make it easier to...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2015-05-15T14:34:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-05-15T14:40:08+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP1.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\\\/4407\\\/friday-fun-a-powershell-macro\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun: A PowerShell Macro\",\"datePublished\":\"2015-05-15T14:34:20+00:00\",\"dateModified\":\"2015-05-15T14:40:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/\"},\"wordCount\":397,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/05\\\/051515_1434_FridayFunAP1.png\",\"keywords\":[\"Help\",\"PowerShell\",\"Scripting\",\"Word\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/\",\"name\":\"Friday Fun: A PowerShell Macro &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/05\\\/051515_1434_FridayFunAP1.png\",\"datePublished\":\"2015-05-15T14:34:20+00:00\",\"dateModified\":\"2015-05-15T14:40:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/05\\\/051515_1434_FridayFunAP1.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/05\\\/051515_1434_FridayFunAP1.png\",\"width\":429,\"height\":91},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4407\\\/friday-fun-a-powershell-macro\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun: A PowerShell Macro\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Friday Fun: A PowerShell Macro &#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\/4407\/friday-fun-a-powershell-macro\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun: A PowerShell Macro &#8226; The Lonely Administrator","og_description":"Today's Friday Fun is a little different in that it showcases two things I use almost every day: Microsoft Word and PowerShell. I am writing new articles and material almost daily and of course very often the content is PowerShell related. Usually I use the blog post template in Word to make it easier to...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/","og_site_name":"The Lonely Administrator","article_published_time":"2015-05-15T14:34:20+00:00","article_modified_time":"2015-05-15T14:40:08+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP1.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\/4407\/friday-fun-a-powershell-macro\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun: A PowerShell Macro","datePublished":"2015-05-15T14:34:20+00:00","dateModified":"2015-05-15T14:40:08+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/"},"wordCount":397,"commentCount":2,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP1.png","keywords":["Help","PowerShell","Scripting","Word"],"articleSection":["Friday Fun","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/","name":"Friday Fun: A PowerShell Macro &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP1.png","datePublished":"2015-05-15T14:34:20+00:00","dateModified":"2015-05-15T14:40:08+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP1.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/05\/051515_1434_FridayFunAP1.png","width":429,"height":91},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun: A PowerShell Macro"}]},{"@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":4278,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-ise\/4278\/friday-fun-send-powershell-ise-content-to-word\/","url_meta":{"origin":4407,"position":0},"title":"Friday Fun: Send PowerShell ISE Content to Word","author":"Jeffery Hicks","date":"March 13, 2015","format":false,"excerpt":"Yesterday on Facebook, Ed Wilson was lamenting about confusion of keyboard shortcuts between PowerShell and Microsoft Word. I've run into the same issue. Muscle memory is strong. Then the discussion turned to getting content from the PowerShell ISE into a Word document. I humorously suggested we had a plugin and\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"geek","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/geek.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1384,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1384\/create-a-master-powershell-online-help-page\/","url_meta":{"origin":4407,"position":1},"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":826,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/826\/friday-the-13-script-blocks\/","url_meta":{"origin":4407,"position":2},"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":1069,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1069\/friday-fun-out-rainbow\/","url_meta":{"origin":4407,"position":3},"title":"Friday Fun Out-Rainbow","author":"Jeffery Hicks","date":"January 21, 2011","format":false,"excerpt":"For my readers who are just discovering my Friday posts, let me remind you that these are not necessarily practical, production worthy PowerShell scripts and functions. They are meant to be fun, yet educational. For example, in today's Friday Fun I have a function that takes string input and writes\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\/01\/out-rainbow-1-1024x412.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/01\/out-rainbow-1-1024x412.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/01\/out-rainbow-1-1024x412.png?resize=525%2C300 1.5x"},"classes":[]},{"id":1931,"url":"https:\/\/jdhitsolutions.com\/blog\/miscellaneous\/1931\/thursday-treat-a-powershell-word-find-game\/","url_meta":{"origin":4407,"position":4},"title":"Thursday Treat &#8211; A PowerShell Word Find Game","author":"Jeffery Hicks","date":"December 29, 2011","format":false,"excerpt":"Now for something completely different but hopefully a little fun. I'm a big fan of word games and puzzles. Tim Bolton has assembled a few PowerShell themed crosswords, which you can find on his blog. I've always like word finds so I put together a pretty simple one using 16\u2026","rel":"","context":"In &quot;Miscellaneous&quot;","block_context":{"text":"Miscellaneous","link":"https:\/\/jdhitsolutions.com\/blog\/category\/miscellaneous\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/PSWordFind-1-300x275.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":8107,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8107\/scripting-challenge-meetup\/","url_meta":{"origin":4407,"position":5},"title":"Scripting Challenge Meetup","author":"Jeffery Hicks","date":"February 1, 2021","format":false,"excerpt":"As you probably know, I am the PowerShell problem master behind the challenges from the Iron Scripter site. Solving a PowerShell scripting challenge is a great way to test your skills and expand your knowledge. The final result is merely a means to an end. How you get there and\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\/2021\/02\/rubik.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4407","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=4407"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4407\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}