{"id":4201,"date":"2009-04-17T15:32:00","date_gmt":"2009-04-17T15:32:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2009\/04\/17\/differences-between-the-ise-and-powershell-console\/"},"modified":"2019-02-18T13:12:42","modified_gmt":"2019-02-18T20:12:42","slug":"differences-between-the-ise-and-powershell-console","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/differences-between-the-ise-and-powershell-console\/","title":{"rendered":"Differences between the ISE and PowerShell console"},"content":{"rendered":"<p>Here is a collection of differences between the PowerShell_ise.exe and PowerShell.exe, as well as workarounds<br \/>and suggestion if you need them (assuming we have them :))<\/p>\n<ol>\n<li>Limited support for interactive console apps, try cmd.exe, then try cmd.exe \/k<\/li>\n<ol>\n<li>cmd.exe \/c dir still works though, and more information is available here<br \/><a href=\"http:\/\/blogs.msdn.com\/powershell\/archive\/2009\/02\/04\/console-application-non-support-in-the-ise.aspx\">http:\/\/blogs.msdn.com\/powershell\/archive\/2009\/02\/04\/console-application-non-support-in-the-ise.aspx<\/a><\/li>\n<\/ol>\n<li>Console Application output is not colorful<\/li>\n<li>STA by default<\/li>\n<ol>\n<li>Try $host.Runspace.ApartmentState<\/li>\n<li>powershell is MTA by default (ApartmentState shows up as Unknown) but can be started in sta mode with powershell -sta.<\/li>\n<li>ISE is always STA<\/li>\n<\/ol>\n<li>No support for the [Console] class, try [console]::BackgroundColor&nbsp; = &#8216;white&#8217;.<\/li>\n<ol>\n<li>In general, scripts should use the host API&#8217;s (write-host, instead of the [Console] class, so that they work in both the console, ISE, Remoting and other shells.<\/li>\n<\/ol>\n<li>Limited (close to zero) support on $host.UI.RawUI. We only support the colors and title<\/li>\n<ol>\n<li>The colors are better set in $psISE.Options, because you can set those to any color, not just console colors<\/li>\n<\/ol>\n<li>Custom\/dead-simple more. See gc function:more<\/li>\n<ol>\n<li>The ISE has no pager<\/li>\n<\/ol>\n<li>Start-Transcript does not work in the ISE<\/li>\n<li>Some Thread Culture differences<\/li>\n<ol>\n<li>If you\u2019re in a non-console supported culture (eg Arabic) ISE will have Get-Culture as ar-sa, and powershell.exe will have Get-Culture as en-us (or some other fallback)<\/li>\n<\/ol>\n<li>Suggestions dont work in the ISE<\/li>\n<ol>\n<li>For example, in C:\\Program Files\\Internet Explorer&#8221; if you execute iexplore.exe<\/li>\n<li>You&#8217;ll only see this in PowerShell.exe<br \/>Suggestion [3,General]: The command iexplore.exe was not found, but does exist in the current location. Windows PowerShe<br \/>ll doesn&#8217;t load commands from the current location by default. If you trust this command, instead type &#8220;.\\iexplore.exe&#8221;.<br \/>&nbsp;See &#8220;get-help about_Command_Precedence&#8221; for more details.<\/li>\n<\/ol>\n<li>The ISE runs a different profile<\/li>\n<ol>\n<li>The ISE profile is in Microsoft.PowerShellISE_profile.ps1, and powershell is in Microsoft.PowerShell_profile.ps1<\/li>\n<li><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/bb613488(VS.85).aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/bb613488(VS.85).aspx<\/a><\/li>\n<li><a href=\"http:\/\/www.leeholmes.com\/blog\/TheStoryBehindTheNamingAndLocationOfPowerShellProfiles.aspx\">http:\/\/www.leeholmes.com\/blog\/TheStoryBehindTheNamingAndLocationOfPowerShellProfiles.aspx<\/a><\/li>\n<li>You can use the common profile, stored in $profile.CurrentUserAllHosts to make it run in both shells<\/li>\n<\/ol>\n<li>Only the ISE has $psISE<\/li>\n<ol>\n<li>it gets access to <a href=\"http:\/\/psisecream.codeplex.com\/\">http:\/\/psisecream.codeplex.com\/<\/a>, and <a href=\"http:\/\/blogs.msdn.com\/powershell\/archive\/2008\/12\/29\/powershell-ise-can-do-a-lot-more-than-you-think.aspx\">http:\/\/blogs.msdn.com\/powershell\/archive\/2008\/12\/29\/powershell-ise-can-do-a-lot-more-than-you-think.aspx<\/a><\/li>\n<\/ol>\n<\/ol>\n<p>There could be others, but parity with PowerShell is a big thing for the ISE.<\/p>\n<p>Cheers,<br \/>Ibrahim Abdul Rahim<br \/>[MSFT]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a collection of differences between the PowerShell_ise.exe and PowerShell.exe, as well as workaroundsand suggestion if you need them (assuming we have them :)) Limited support for interactive console apps, try cmd.exe, then try cmd.exe \/k cmd.exe \/c dir still works though, and more information is available herehttp:\/\/blogs.msdn.com\/powershell\/archive\/2009\/02\/04\/console-application-non-support-in-the-ise.aspx Console Application output is not colorful [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[137,248,260,270,322],"class_list":["post-4201","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-ctp3","tag-powershell","tag-powershell-ise","tag-powershell-v2","tag-sta"],"acf":[],"blog_post_summary":"<p>Here is a collection of differences between the PowerShell_ise.exe and PowerShell.exe, as well as workaroundsand suggestion if you need them (assuming we have them :)) Limited support for interactive console apps, try cmd.exe, then try cmd.exe \/k cmd.exe \/c dir still works though, and more information is available herehttp:\/\/blogs.msdn.com\/powershell\/archive\/2009\/02\/04\/console-application-non-support-in-the-ise.aspx Console Application output is not colorful [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=4201"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4201\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=4201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=4201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=4201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}