This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

PowerShell Script to start down service

i have created an application template to monitor 6 windows services on ~1600 VMs. If one of these services goes down, we get a Slack message alerting us the service is down. Instead of manually starting the service through Orion every time, i would like for this service to automatically try to start itself.

I think there is an APM out of the box trigger action to start a service, but we do not have APM. These are our current modules: Orion Platform 2018.4 HF3, WPM 2.2.3, IPAM 4.8.1 HF1, NCM 7.9, NPM 12.4, SAM 6.8.0, NetPath 1.1.4

I was wondering if its possible to create a powershell script to start the down service, but i'm having trouble coming up with a way to implement this.

Let's say ServiceX on VM123 stops and we get our Slack alert. How would i tell Powershell to specifically start that ​ServiceX ​on VM123? i'm sure there's a variable somewhere for that, but i haven't had luck finding it.

Here is my trigger condition for the alert:

pastedImage_0.png

Any help would be greatly appreciated!!!