Does it really have to be continuously monitored, or can you just run a script every 5 minutes via a scheduler like the Windows Task Scheduler.
If you have access to Azure Application Insights, you could also record the result there which will give you an availability map over time of said service.
Decent monitoring tools will re-run the test on failure a number of times before finally reporting as a failure.
This is normally configurable and based on the importance of what is being monitored. Perhaps make this into a function with this as a configuration option. (number of retries).
This can prevent false\positives and other connectivity issues, but might not be appropriate based on the service you are monitoring.
Finally, have you considered investing in a monitoring tool like PRTG or an SNMP tool. (Windows services can be monitored by SNMPc and you can usually try a force restart, just make sure you change the default password if you install the agent on a server). Most of these reporting tools are not real time, but poll the service\system\server on a configurable time element. 2 minutes, five minutes, ten minutes, etc. The tools can then perform various actions on failures which you can probably replicate in PowerShell, but expect to be writing a fair bit of code to implement this properly, with error handling, etc.