Kaseya Community

PowerShell Command to Trigger Alarm

This question is not answered

Hi, I'm trying to figure out a way to see if Kaseya can create an alarm for us on Hyper-V based Windows 2012 servers and hyper-v replicas.  What i'd like to do is have it run a powershell command, and if it returns any results, log the results and trigger an alarm to send an email.  

The command to be run on the servers is:

get-vm | select-object Name, ReplicationState, ReplicationHealth | where {$_.replicationstate -ne "Disabled" -and $_.replicationhealth -ne "Normal"}

All Replies
  • Have the Powershell command create some form of output. I.e create a text file with the command result in it

    Then the next step in your agent procedure can just read the file content , and if if contains a specif word/phrase the execute a Send Email or Create Alarm/Ticket step

    Or you could execute the powershell via a Kaseya ExecuteShellCommand to Variable  , and then check the variable to see if you need to create the Alarm/Email etc