Does Not work: Execute-Process -WindowStyle Hidden

Execute-Process -Path “$envWinDir\Notepad.exe” -WindowStyle Hidden

The above command does not hide the Notepad window. I have a process (application) I need to start silently. However, I want the entire PSADT to be interactive to the user.


For those curious - Maximized and Minimized also do not work as designed.


Just an FYI - this DOES work… So I guess this cmdlet Execute-Process is broke or how it translates information to Start-Process.

Start-Process -FilePath “$env:windir\Notepad.exe” -WindowStyle Hidden

Execute-Process -Path “$envWinDir\Notepad.exe” -WindowStyle Hidden


Thanks for the bug report, however next time please create an Issue on our Github page:

Also, remember that hiding the window through windowstyle doesn’t make the program stop automatically, its just not visible and can block your script until a button is closed even though its not visible.