Windows – Powershell runs all external commands in a new window, omitting output

powershellwindows

As described in the subject, my powershell environment is executing all external commands in separate windows. In a typical test run of my team's build script, this includes things like:

  • nuget.exe running for each project in a sln
  • nunit test runners

It's quite aggravating. The behavior actually prevents me from multi-tasking while running psake builds, since it grabs my mouse/keyboard focus whenever a new window appears/disapears. It also swallows valuable output from assorted steps in our build process.

As per https://stackoverflow.com/questions/8181490/powershell-suddenly-opens-cmd-exe-for-executing-bats, I checked $env:PATHEXT, but it is set up correctly (includes .EXE in its items, which are a semicolon-delimited list).

I am the only member of the team seeing this behavior, and it appears to be associated with some global/roaming profile for my user, as it is still happening even after I re-imaged my machine.

Any help would be greatly appreciated and I can provide additional info upon request.

Best Answer

How are the scripts written? My first reaction would be to use Start-Process with the -NoNewWindiw parameter.