{"id":299,"date":"2011-12-28T15:45:55","date_gmt":"2011-12-28T20:45:55","guid":{"rendered":"http:\/\/nukeitmike.com\/blog\/?p=299"},"modified":"2011-12-28T15:45:55","modified_gmt":"2011-12-28T20:45:55","slug":"launch-a-powershell-script-minimized","status":"publish","type":"post","link":"https:\/\/blog.nukeitmike.com\/index.php\/2011\/12\/28\/launch-a-powershell-script-minimized\/","title":{"rendered":"Launch a PowerShell script minimized"},"content":{"rendered":"<p>We use Citrix for a lot of applications, and I have a need to launch Outlook, then an application, and then close Outlook when that application is closed by the user.&#160; This seems like a pretty simple thing to do (and I suppose it is, sort of) but it took me a while to figure it out.&#160; <\/p>\n<p>One piece of the puzzle is that PowerShell remains open if you do it the way I have it setup right now.&#160; If the user closes that PowerShell window, then the monitor process will not close Outlook when the user exits the LOB app.&#160; In order to mitigate this issue somewhat, I wanted to start PowerShell minimized.&#160; The way to do this is:<\/p>\n<blockquote>\n<p>powershell -WindowStyle Minimized .\\ScriptToRun.ps1<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>We use Citrix for a lot of applications, and I have a need to launch Outlook, then an application, and then close Outlook when that application is closed by the user.&#160; This seems like a pretty simple thing to do (and I suppose it is, sort of) but it took me a while to figure&hellip; <a class=\"more-link\" href=\"https:\/\/blog.nukeitmike.com\/index.php\/2011\/12\/28\/launch-a-powershell-script-minimized\/\">Continue reading <span class=\"screen-reader-text\">Launch a PowerShell script minimized<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,25],"tags":[62,135,154],"class_list":["post-299","post","type-post","status-publish","format-standard","hentry","category-citrix","category-scripting","tag-citrix","tag-powershell","tag-scripting","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pcW544-4P","_links":{"self":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/comments?post=299"}],"version-history":[{"count":0,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/299\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/media?parent=299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/categories?post=299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/tags?post=299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}