Powershell Monitor


  • Hello everybody,

    I have a problem with my SCOM 2012 R2.

    I have create a Powershell Monitor with the Help of the "Sample Management Pack".

    The Monitor itself works, I write a log and see that the Monitor runs every 30 seconds on my Testserver.

    But the Alerting is the Problem, I am get no alerts in the Console. If I watch the health Explorer the State won't change.

    Can you help me out with any Ideas?

    If you need more infos please tell me which one you need.

    Thanks in advance

    Example Monitor:

    #Var initialisation
    $state = 'BAD'
    $logfile = "C:\ITSO\TestMonitor.txt"

    #Create SCOM Script api connection
    $api = New-Object -comObject 'MOM.ScriptAPI'

    #Create property bag
    $bag = $api.CreatePropertyBag()

    #Add values to the bag  

    $date = date
    "---------------------------" >> $logfile
    $date >> $logfile

    #Return the bag    

    Unhealthy Expression


    jueves, 14 de junio de 2018 9:45


Todas las respuestas