Windows Powershell is Microsoft's command line interface. Powershell scripts can be run as a Windows Service using FireDaemon Pro, which lets you start the application automatically at boot prior to login, start multiple instances of the application and more. This HOWTO will show you how to set it up. You can also use Fusion to manage FireDaemon and other Windows services via a web browser.
Windows Powershell Setup Under FireDaemon Pro
Download and install FireDaemon Pro into the directory of your choice, typically C:\Program Files\FireDaemon.
Next start the FireDaemon GUI from the desktop shortcut. Click on the "Create a new service definition" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below. Adjust the paths to suit your installation. Note the required parameters.
- Executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
- Working Directory: C:\Windows\System32\WindowsPowerShell\v1.0
- Parameters: C:\path\to\script.ps1 (adjust to suit your script path)
Now click on the Settings tab. If you DON'T want to see your script running, uncheck the Interact with Desktop check box & select "Hidden" from the "Show Window" dropdown. While not required, it is often helpful to run your Powershell script as the user you installed it as, particularly if the script accesses resources unavailable to all users. In the Logon Account field type your username (e.g. Administrator) and then enter the user's password twice in the Password and Confirm fields. You can change the Process Priority to allocate more CPU time to the script or specify which CPU or core the script will run on (in the case of multi-processor, hyperthreaded or multi-core CPUs).
Now click the Lifecycle tab. Make sure Console Application is checked, and Graceful Shutdown is unchecked.
If you'd like to schedule your script to run at specific times, click the Scheduling tab and enter the times you would like the script to run.
Now click OK to finish setup and start running your Powershell script!