Forum Thread: Powershell in Background

Is there a way to make powershell keep running in the background continuously?
powershell -windowstyle hidden -file "file" seems to run the script only once in background and not continuously.

1 Response

powershell.exe -noexit -windowstyle hiddden

if you want the script to do something forever, you can add a do while loop.
Example:
$a=1
do{ command here} while ($a -ne 0)

Since you do not have a command changing the $a variable, it will continue to run the command you put in the brackets.

Share Your Thoughts

  • Hot
  • Active