I am trying to run a script, and I can't have a powershell window pop up for it. I am trying to use the -WindowStyle Hidden when starting, but it is not working for me. I am using Win7 x64.
To test, I hit Win + R, and in the Run box, I type: powershell -WindowStyle Hidden my_script.ps1
And when I hit Enter, Powershell window pops up.
If I try to just run powershell.exe -WindowStyle Hidden
without any script, a new powershell window pops up, and then disappears. I can see in the task manager that it is still running, so I guess it is hidden eventually.. but it still opened a window initially.
How do I run a powershell script without a powershell widow opening at all?
Thanks!