{"id":4011,"date":"2014-09-12T11:00:42","date_gmt":"2014-09-12T15:00:42","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=4011"},"modified":"2014-09-10T17:10:52","modified_gmt":"2014-09-10T21:10:52","slug":"friday-fun-a-popup-alternative","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/","title":{"rendered":"Friday Fun &#8211; A Popup Alternative"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/windowpane-thumbnail.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-4012\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/windowpane-thumbnail.jpg\" alt=\"windowpane-thumbnail\" width=\"170\" height=\"113\" \/><\/a> In the past I've written and presented about different ways to add graphical elements to your PowerShell scripts that don't rely on Windows Forms or WPF. There's nothing wrong with those techniques, but they certainly require some expertise and depending on your situation may be overkill. So let's have some fun today and see how you can display a popup message in a graphical form, using something you already know how to use.<\/p>\n<p>It may not be sexy, but how about using Notepad. Here's how. First, you need some content to display. Using a here string is good approach as it makes it easy to create a multi-line block of text.<\/p>\n<pre class=\"lang:ps decode:true \">$text=@\"\r\nThis part of the script has completed.\r\nClose Notepad to continue.\r\nThank you.\r\n\"@<\/pre>\n<p>With a here string you could also insert variables.<\/p>\n<pre class=\"lang:ps decode:true \">$var = \"Foo\"\r\n$text=@\"\r\n$(Get-Date)\r\nProcessing has finished on $($env:COMPUTERNAME)\r\n\r\nThe final value of var is $var\r\n\"@<\/pre>\n<p>Next, create a temporary file with the text.<\/p>\n<pre class=\"lang:ps decode:true \">$text | Out-File -FilePath d:\\temp\\mytemp.txt -Encoding ascii<\/pre>\n<p>To display the message all you need to do is run Notepad.<\/p>\n<pre class=\"lang:ps decode:true \">notepad d:\\temp\\mytemp.txt<\/pre>\n<p>This will return your PowerShell prompt but you want to make the popup more integral to your script, in which case I'd suggest using Start-Process.<\/p>\n<pre class=\"lang:ps decode:true \">Start-Process notepad -ArgumentList d:\\temp\\mytemp.txt -Wait -noNewWindow<\/pre>\n<p>The major advantage is that when you close Notepad your script continues so you can then delete the temp file. While we're mentioning the temp file, if you tried my demo you'll notice that the file name is displayed in the title bar. There's no requirement that your file have an extension.<\/p>\n<pre class=\"lang:ps decode:true \">[string]$Title = \"Script Complete\"\r\n$tmpFile = Join-Path -Path $env:temp -ChildPath $Title\r\n$text | Out-File -FilePath $tmpFile -Encoding ascii\r\nStart-Process notepad -ArgumentList $tmpFile -Wait -noNewWindow<\/pre>\n<p>Notice my use of Join-Path to create a file name. I suggest you use this cmdlet instead of trying to concatenate pieces together. But now I get something a little nicer.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/notepad-popup.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4013\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/notepad-popup-1024x407.png\" alt=\"notepad-popup\" width=\"474\" height=\"188\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/notepad-popup-1024x407.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/notepad-popup-300x119.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/notepad-popup.png 1278w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>With Notepad you could save the file elsewhere or even print it. I even created a re-usable function for you. <\/p>\n<pre class=\"lang:ps decode:true \" >Function New-NotepadPopup {\r\n\r\n&lt;#\r\n.Synopsis\r\nDisplay a popup message in Notepad\r\n.Description\r\nThis command displays a text message in a Notepad window.\r\n.Parameter Text\r\nThe text to be displayed in Notepad. Using a here string is recommended.\r\n.Parameter Title\r\nThis will be used for the file name. You don't need to include a file extension.\r\n.Parameter Wait\r\nForce the PowerShell to wait until Notepad is closed. \r\n.Example\r\nPS C:\\&gt; $text=@\"\r\nThis part of the script has completed.\r\nClose Notepad to continue.\r\nThank you.\r\n\"@\r\nPS C:\\&gt; New-NotepadPopup $Text -title \"Finished\" -wait\r\n.Notes\r\nLast Updated: September 10, 2014\r\nVersion     : 1\r\n\r\n.Link\r\nStart-Process\r\n#&gt;\r\n\r\n[cmdletbinding()]\r\nParam(\r\n[Parameter(Position=0,Mandatory=$True,HelpMessage=\"Enter text to be displayed\")]\r\n[ValidateNotNullorEmpty()]\r\n[string]$Text,\r\n[Parameter(Position=1)]\r\n[ValidateNotNullorEmpty()]\r\n[ValidatePattern({^\\w+$})]\r\n[string]$Title = \"Notice\",\r\n[switch]$Wait\r\n)\r\n\r\nWrite-Verbose -Message \"Starting $($MyInvocation.Mycommand)\"  \r\n\r\n#create a temp filename\r\n$tmpFile = Join-Path -Path $env:temp -ChildPath $Title\r\n\r\n#create the temp file\r\nWrite-Verbose \"Creating $tmpFile\"\r\n$text | Out-File -FilePath $tmpFile -Encoding ascii\r\n\r\n#launch notepad and wait\r\nWrite-Verbose \"Displaying Notepad\"\r\n\r\n#hashtable of values to splat to Start-Process\r\n$paramHash = @{\r\n Filepath = join-path -path $env:windir -childpath notepad.exe\r\n argumentList = $tmpFile\r\n NoNewWindow = $True\r\n}\r\n\r\nIf ($Wait) {\r\n    $paramHash.Add(\"Wait\",$True)\r\n}\r\n\r\nStart-Process @paramHash\r\n\r\n#if not waiting sleep for a few seconds to give Notepad a chance to display the file\r\nif (-Not $Wait) {\r\n    Start-Sleep -Seconds 2\r\n}\r\n\r\n#delete temp file\r\nWrite-Verbose \"Deleting $tmpFile\"\r\nRemove-Item $tmpFile\r\n\r\nWrite-Verbose -Message \"Ending $($MyInvocation.Mycommand)\"\r\n\r\n\r\n} #end function<\/pre>\n<p>This function will automatically delete the temp file for you. If you have another text file viewer that you can launch from the command line you could use that instead of Notepad. As I mentioned at the beginning this is hardly exciting PowerShell but I hope you picked up something new and useful. Have a great weekend.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the past I&#8217;ve written and presented about different ways to add graphical elements to your PowerShell scripts that don&#8217;t rely on Windows Forms or WPF. There&#8217;s nothing wrong with those techniques, but they certainly require some expertise and depending on your situation may be overkill. So let&#8217;s have some fun today and see how&#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 from the blog: Friday Fun - A Popup Alternative for #PowerShell http:\/\/bit.ly\/Zhc7g8","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":[568,534,540],"class_list":["post-4011","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-scripting","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 - A Popup Alternative &#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\/4011\/friday-fun-a-popup-alternative\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun - A Popup Alternative &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"In the past I&#039;ve written and presented about different ways to add graphical elements to your PowerShell scripts that don&#039;t rely on Windows Forms or WPF. There&#039;s nothing wrong with those techniques, but they certainly require some expertise and depending on your situation may be overkill. So let&#039;s have some fun today and see how...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2014-09-12T15:00:42+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/windowpane-thumbnail.jpg\" \/>\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\\\/4011\\\/friday-fun-a-popup-alternative\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun &#8211; A Popup Alternative\",\"datePublished\":\"2014-09-12T15:00:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/\"},\"wordCount\":340,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/windowpane-thumbnail.jpg\",\"keywords\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/\",\"name\":\"Friday Fun - A Popup Alternative &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/windowpane-thumbnail.jpg\",\"datePublished\":\"2014-09-12T15:00:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/#primaryimage\",\"url\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/windowpane-thumbnail.jpg\",\"contentUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/windowpane-thumbnail.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4011\\\/friday-fun-a-popup-alternative\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun &#8211; A Popup Alternative\"}]},{\"@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 Popup Alternative &#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\/4011\/friday-fun-a-popup-alternative\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun - A Popup Alternative &#8226; The Lonely Administrator","og_description":"In the past I've written and presented about different ways to add graphical elements to your PowerShell scripts that don't rely on Windows Forms or WPF. There's nothing wrong with those techniques, but they certainly require some expertise and depending on your situation may be overkill. So let's have some fun today and see how...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/","og_site_name":"The Lonely Administrator","article_published_time":"2014-09-12T15:00:42+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/windowpane-thumbnail.jpg","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\/4011\/friday-fun-a-popup-alternative\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun &#8211; A Popup Alternative","datePublished":"2014-09-12T15:00:42+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/"},"wordCount":340,"commentCount":0,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/windowpane-thumbnail.jpg","keywords":["Friday Fun","PowerShell","Scripting"],"articleSection":["Friday Fun","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/","name":"Friday Fun - A Popup Alternative &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/windowpane-thumbnail.jpg","datePublished":"2014-09-12T15:00:42+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/#primaryimage","url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/windowpane-thumbnail.jpg","contentUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/windowpane-thumbnail.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun &#8211; A Popup Alternative"}]},{"@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":2976,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2976\/powershell-popup\/","url_meta":{"origin":4011,"position":0},"title":"PowerShell PopUp","author":"Jeffery Hicks","date":"April 29, 2013","format":false,"excerpt":"At the recent PowerShell Summit I presented a session on adding graphical elements to your script without the need for WinForms or WPF. One of the items I demonstrated is a graphical popup that can either require the user to click a button or automatically dismiss after a set time\u2026","rel":"","context":"In &quot;Conferences&quot;","block_context":{"text":"Conferences","link":"https:\/\/jdhitsolutions.com\/blog\/category\/conferences\/"},"img":{"alt_text":"popup","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/popup-300x139.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1645,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-ise\/1645\/friday-fun-add-a-print-menu-to-the-powershell-ise\/","url_meta":{"origin":4011,"position":1},"title":"Friday Fun Add A Print Menu to the PowerShell ISE","author":"Jeffery Hicks","date":"September 9, 2011","format":false,"excerpt":"I spend a fair amount of time in the PowerShell ISE. One task that I find myself needing, especially lately, is the ability to print a script file. I'm sure you noticed there is no Print menu choice. So I decided to add my own to the ISE. Printing 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":"","width":0,"height":0},"classes":[]},{"id":3004,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3004\/powershell-messagebox\/","url_meta":{"origin":4011,"position":2},"title":"PowerShell Messagebox","author":"Jeffery Hicks","date":"May 8, 2013","format":false,"excerpt":"Recently I posted an article explaining how to create a popup box in PowerShell using the Wscript.Shell COM object from our VBScript days. That was something I presented at the PowerShell Summit. Another option is a MessageBox, again like we used to use in VBScript. This works very much like\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"messagebox","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/messagebox-300x147.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4471,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4471\/friday-fun-tickle-me-powershell\/","url_meta":{"origin":4011,"position":3},"title":"Friday Fun: Tickle Me PowerShell!","author":"Jeffery Hicks","date":"July 24, 2015","format":false,"excerpt":"I work at home for myself which means I have to act as my own assistant, reminding me of important events and tasks. And sometimes I need a little help. So why not use PowerShell? In the past I've used and written about using a background job to wait until\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":3455,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3455\/friday-fun-color-my-web\/","url_meta":{"origin":4011,"position":4},"title":"Friday Fun Color My Web","author":"Jeffery Hicks","date":"September 20, 2013","format":false,"excerpt":"Awhile ago I posted an article demonstrating using Invoke-Webrequest which is part of PowerShell 3.0. I used the page at Manning.com to display the Print and MEAP bestsellers. By the way, thanks to all of you who keep making PowerShell books popular. My original script simply wrote the results to\u2026","rel":"","context":"In &quot;Books&quot;","block_context":{"text":"Books","link":"https:\/\/jdhitsolutions.com\/blog\/category\/books\/"},"img":{"alt_text":"get-manningbestseller1","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/09\/get-manningbestseller1-1024x606.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/09\/get-manningbestseller1-1024x606.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/09\/get-manningbestseller1-1024x606.png?resize=525%2C300 1.5x"},"classes":[]},{"id":1185,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1185\/friday-fun-get-messagebox\/","url_meta":{"origin":4011,"position":5},"title":"Friday Fun Get MessageBox","author":"Jeffery Hicks","date":"March 4, 2011","format":false,"excerpt":"Today's Friday Fun offers a way for you to graphically interact with your PowerShell scripts and functions without resorting to a lot of complex Winform scripting. I have a function that you can use to display an interactive message box complete with buttons like Yes, No or Cancel. You can\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\/03\/msgbox.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4011","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=4011"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4011\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}