{"id":78955,"date":"2016-06-23T11:59:23","date_gmt":"2016-06-23T18:59:23","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/?p=78955"},"modified":"2019-02-18T09:10:35","modified_gmt":"2019-02-18T16:10:35","slug":"powertip-set-the-color-of-the-progress-bar-with-powershell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-set-the-color-of-the-progress-bar-with-powershell\/","title":{"rendered":"PowerTip: Set the color of the progress bar with PowerShell"},"content":{"rendered":"<p><strong>Summary<\/strong>: Use the $Host object to alter the color of the progress bar in PowerShell.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/> I was curious if there\u2019s a way to change the color of the progress bar in PowerShell. Do you know how this could be done?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/> Glad you asked! You can do this by altering the values for <strong>ProgressBackGroundColor<\/strong> and <strong>ProgressForegroundColor<\/strong> under <strong>$Host.PrivateData<\/strong>.<\/p>\n<p style=\"padding-left: 30px\">To change to a bright green background with a black foreground, use the following code in PowerShell:<\/p>\n<p style=\"padding-left: 120px\"><code>$Host.PrivateData.ProgressBackgroundColor=\u2019Green\u2019\n$Host.PrivateData.ProgressForegroundColor=\u2019Black\u2019<\/code><\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7610.Dr.ScriptoForTips.jpg\" alt=\"The Doctor\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Use the $Host object to alter the color of the progress bar in PowerShell. I was curious if there\u2019s a way to change the color of the progress bar in PowerShell. Do you know how this could be done? Glad you asked! You can do this by altering the values for ProgressBackGroundColor and ProgressForegroundColor [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[568,639,641],"tags":[56,356,154,45],"class_list":["post-78955","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hey-scripting-guy","category-powertip","category-windows-powershell","tag-guest-blogger","tag-powertip","tag-sean-kearney","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Use the $Host object to alter the color of the progress bar in PowerShell. I was curious if there\u2019s a way to change the color of the progress bar in PowerShell. Do you know how this could be done? Glad you asked! You can do this by altering the values for ProgressBackGroundColor and ProgressForegroundColor [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/78955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=78955"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/78955\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=78955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=78955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=78955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}