The PowerShell console and PowerShell ISE behave differently when executables are written to the standard error stream ( stderr ). The console (powershell.exe) displays it as standard output. For example, when I get status with Mercurial in a non-repository, it writes a standard error:
> hg st -RC:\Windows abort: repository C:\Windows not found!
However, in PowerShell ISE ( powershell_ise.exe ), this error is passed to the PowerShell Write-Error cmdlet:
> hg st -RC:\Windows hg.exe : abort: repository C:\Windows not found! At line:1 char:3 + hg <<<< st -RC:\Windows + CategoryInfo : NotSpecified: (abort: repository C:\Windows not found!:String) [], RemoteExcepti on + FullyQualifiedErrorId : NativeCommandError
Is there a way to configure ISE to behave like a console and not send the stderr stream to Write-Error ?
powershell powershell-ise
Aaron jensen
source share