How to use Powershell for a custom check in Servers Alive In Servers Alive you can use an external program as a check. This external program could be your own Powershell script. This howto explains how to do this.

  1. Below is an example of a powershell script that checks if a certain registry value is still 1. You save this script as (example!) c:\data\myscripts\reg_check.ps1
    $Value=Invoke-Command -computername $RemoteServer -ScriptBlock {(get-itemproperty "HKLM:\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Agent\2.0").Forcefixup}
    if ($Waarde -eq $RefValue)
    write-host "OK. Value ForceFixup is $Value. "
    exit 0
    write-host "Error. Value ForceFixup is $Value, must be $RefValue."
    exit 1
  2. In Servers Alive create a new entry and as check type select EXTERNAL (ERRORLEVEL)

  3. As commandline enter:
    powershell -NoProfile -ExecutionPolicy bypass -File "c:\data\myscripts\reg_check.ps1" %h
    and as rule you would set it to "is <> from 0"

  4. Woodstone would like to thank David White for creating the document on which this HOWTO is based.
Order online Servers Alive to monitor your network
Program Features
What's new in v10.x?
Document Collection
Template examples
Free add-ons
License Agreement
Prices from 199 EURO
Different editions

Download Free Trial Servers Alive

from our main website
or download it from one of our mirror download sites around the world.
If you're a business owner or manager, you know that network outages can affect your income, brand integrity, and bottom line. Here's a non-technical description of how Servers Alive can monitor your network and alert your IT staff when there's a problem.

Servers Alive - Like Life Insurance For Your Business - Only Cheaper

Try Before You Buy!

Try Servers Alive for FREE with no time limit....
You can try all of the features to see if the program meets your needs.
Download page

Customer praise

"...The creator of [Servers Alive] has made one of the greatest efforts I know in providing a superior product. Don't hesitate. You'll never look back."

Doug Woznicki
Pioneer - Standard Electronics Inc.