Is there a way to bring a window in front from powershell? I tried this to hide all windows (working) and bring me the powershell back (not working)
[void] [
This is cheating a bit since it's using WScript, but the following one-liner places the window in the foreground without requiring any external cmdlet installation.
In the example below, "notepad" is the process name associated with the window.
Credit goes to the Idera forum posting here by JSanders:
(New-Object -ComObject WScript.Shell).AppActivate((get-process notepad).MainWindowTitle)