What are differences between PowerShell Console and PowerShell ISE. I am asking this question in context of Profiles in PowerShell. Because PowerShell Console and PowerShell ISE both have differnet profiles.
The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for Windows PowerShell. In the ISE, you can run commands and write, test, and debug scripts in a single Windows-based graphic user interface.
There are six alternatives to Powershell ISE for Windows, Mac, Linux and Chrome OS. The best alternative is Visual Studio Code, which is free. Other great apps like Powershell ISE are Lapce, JetBrains Fleet, PowerShell Studio and PowerGui.
Perhaps the reason is that “ISE” sounds a little like “IDE” (Integrated Development Environment). Thus, whenever they need a PowerShell console, they launch this old-fashioned “Windows 95 DOS prompt.” Of course, PowerShell ISE is a great scripting tool; however, it is also a powerful CLI.
From Differences between the ISE and PowerShell console:-
Limited support for interactive console apps, try cmd.exe, then try cmd.exe /k
a) cmd.exe /c dir still works though, and more information is available here http://blogs.msdn.com/powershell/archive/2009/02/04/console-application-non-support-in-the-ise.aspx
Console Application output is not colorful
STA by default
a) Try $host.Runspace.ApartmentState
b) powershell is MTA by default (ApartmentState shows up as Unknown) but can be started in sta mode with powershell -sta.
c) ISE is always STA
No support for the [Console] class, try [console]::BackgroundColor = 'white'.
a) In general, scripts should use the host API's (write-host, instead of the [Console] class, so that they work in both the console, ISE, Remoting and other shells.
Limited (close to zero) support on $host.UI.RawUI. We only support the colors and title
a) The colors are better set in $psISE.Options, because you can set those to any color, not just console colors
Custom/dead-simple more. See gc function:more
a) The ISE has no pager
Start-Transcript does not work in the ISE
Some Thread Culture differences
a) If you’re 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)
Suggestions dont work in the ISE
a) For example, in C:\Program Files\Internet Explorer" if you execute iexplore.exe
b) You'll only see this in PowerShell.exe Suggestion [3,General]: The command iexplore.exe was not found, but does exist in the current location. Windows PowerShe ll doesn't load commands from the current location by default. If you trust this command, instead type ".\iexplore.exe".
See "get-help about_Command_Precedence" for more details.
The ISE runs a different profile
a) The ISE profile is in Microsoft.PowerShellISE_profile.ps1, and powershell is in Microsoft.PowerShell_profile.ps1
b) http://msdn.microsoft.com/en-us/library/bb613488(VS.85).aspx
c) http://www.leeholmes.com/blog/TheStoryBehindTheNamingAndLocationOfPowerShellProfiles.aspx
d) You can use the common profile, stored in $profile.CurrentUserAllHosts to make it run in both shells
Only the ISE has $psISE
a)it gets access to http://psisecream.codeplex.com/, and http://blogs.msdn.com/powershell/archive/2008/12/29/powershell-ise-can-do-a-lot-more-than-you-think.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With