When you run a powershell window in the background, how do you re-connect to it? Or instead, is it's output intended to be viewed via log file at that point?
When you run a powershell window in the background, how do you re-connect to it? Or instead, is it's output intended to be viewed via log file at that point?
You can always change the window style of the current window by creating a new PowerShell session and using the -WindowStyle switch:
PowerShell -Command {exit} -WindowStyle Hidden # Hide the window
Start-Sleep 1 # Do something while hidden
PowerShell -Command {exit} -WindowStyle Normal # Unhide the window
This also works if you have e.g. a monitoring script, which was started hidden and is only meant to show up once a condition was met.