I have a file system monitoring PowerShell script using System.IO.FileSystemWatcher events.
The script works great, but it requires an open PowerShell window.
Thus, I need to run it as a Windows Service at Windows startup (without logon). Is there a way to do this?
To execute your script at windows startup (without logon) you could create a windows service for it (using srvany.exe).
Steps:
Create the service using sc and srvany.exe
Parametrize your service
Some remarks: