I\'ve created a script that I want to run as a service. It uses Invoke-RestMethod to monitor an application on the server and, when it detects an unwanted condition, it rest