WMI service watchdog script

A powershell script that will monitor WMI service health and automatically restart WMI service and processes if any error is detected.

wmi-watchdog.ps1
 
 
 
 
 
(0)
4,955 times
Add to favorites
Operating System
3/28/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Where is the output going?
    2 Posts | Last post March 13, 2015
    • Hi.......Learning PS and am a complete noobie.  I want to start and stop services using PS.  A great example.(Thanks).  The key is that I need to produce an output file capturing success or failure which I believe your code does. Wher is that file being eritten to.
      
      Thank you in advance.
      
      Jig
    • In this script the output is going to event log on the machine where the script is run. Look for "Write-EventLog" commands in the script. No output is written to file but you can modify it to write to a log file by substituting "Write-Eventlog" commands with "Out-File"