TN WW255 Using Windows PowerShell to Monitor and Control Wonderware Processes
Description
This article from InSource shows how to use a combination of scripts to monitor a Wonderware process to see if it's running, and then perform some action if it's not running. The process uses Windows PowerShell and VBScripts.
- Author: Rufus Handsome
- Published: 10/30/2019
- Applies to: Wonderware versions 2014R2 and 2017 all versions
Details
// *********Power Shell Script "filename.ps1" to see if a process is running or not, then kill another process if not ******************** //
// ********* In the below example: ************************************************************** //
// 1.) Monitor WindowViewer (view.exe) to see if it's running, ************* //
// 2.) If it's not running, Stop-Process named "notepad" in this example ************ //
// 3.) Else do something else like echo "Running" ************ //
// ************************************* CODE FOLLOWS ************************************** //