Windows: I want to run a command line script from task scheduler without opening a console window. How?
Task scheduler:
- Program/script:
powershell.exe
- Add arguments:
-windowstyle hidden -command "C:\Full\Path\To\Script.cmd"
- Start in: (optional)
Also, set powershell execution policy first to be able to run powershell scripts
There are other ways to solve this, but this will let you "Run only when user is logged on".