Tutorial by Examples

PS> console_app.exe PS> & console_app.exe PS> Start-Process console_app.exe
PS> gui_app.exe (1) PS> & gui_app.exe (2) PS> & gui_app.exe | Out-Null (3) PS> Start-Process gui_app.exe (4) PS> Start-Process gui_app.exe -Wait (5) GUI applications launch in a different process, and will immediately return control to the PowerShell host. Sometimes you...
PS> $ErrorActionPreference = "Continue" (1) PS> & console_app.exe *>&1 | % { $_ } (2) PS> & console_app.exe *>&1 | ? { $_ -is [System.Management.Automation.ErrorRecord] } (3) PS> & console_app.exe *>&1 | ? { $_ -is [System.Management.Automati...
PS> $LastExitCode PS> $? PS> $Error[0] These are built-in PowerShell variables that provide additional information about the most recent error. $LastExitCode is the final exit code of the last native application that was executed. $? and $Error[0] is the last error record that was gene...

Page 1 of 1