{"id":142,"date":"2013-09-03T10:17:13","date_gmt":"2013-09-03T10:17:13","guid":{"rendered":"https:\/\/www.sharepoint13.org\/?p=142"},"modified":"2013-09-03T10:17:13","modified_gmt":"2013-09-03T10:17:13","slug":"throw-a-message-box-in-powershell","status":"publish","type":"post","link":"https:\/\/www.sharepoint13.org\/?p=142","title":{"rendered":"Throw a Message box in PowerShell"},"content":{"rendered":"<p><a href=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2013\/09\/image.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2013\/09\/image_thumb.png\" width=\"316\" height=\"172\" \/><\/a><\/p>\n<p>I work to much, that\u2019s a fact! So todays tip is how to throw a Coffee Break message box in PS.. Hehe\u2026 useful in long scripts, or as a scheduled task on the Laptop. Quite nerdy tip <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none\" alt=\"Smile\" src=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2013\/09\/wlEmoticon-smile.png\" \/><\/p>\n<p>1. Start PS as Admin, Load the Assembly   <br \/><em><strong>[System.Reflection.Assembly]::LoadWithPartialName(&quot;System.Windows.Forms&quot;)<\/strong><\/em> <\/p>\n<p>2. Display a simple \u201cOK\u201d box with title;   <br \/><strong><em>[System.Windows.Forms.MessageBox]::Show(&quot;Coffee Break! \u2013Click \u201cOK\u201d when cup is empty &quot; , &quot;the Coffee Break&quot;)<\/em><\/strong><\/p>\n<p>There are like 6 different message boxes in PowerShell, if you got inspired&#160; you can find in depth information here:   <br \/><a title=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.windows.forms.messageboxbuttons.aspx\" href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.windows.forms.messageboxbuttons.aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/system.windows.forms.messageboxbuttons.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I work to much, that\u2019s a fact! So todays tip is how to throw a Coffee Break message box in PS.. Hehe\u2026 useful in long scripts, or as a scheduled task on the Laptop. Quite<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[11],"class_list":["post-142","post","type-post","status-publish","format-standard","hentry","category-tip","tag-powershell"],"_links":{"self":[{"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=142"}],"version-history":[{"count":1,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":143,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions\/143"}],"wp:attachment":[{"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}