Top Memory Consuming Processes to OpsMgr Event Log

For OpsMgr 2007 and 2012, this script identifies top memory consuming processes (Process\Working Set perf counter with 100MB minimum) and logs the list in an Event 5000 in the Operations Manager Event Log. Designed to be used as a  Diagnostic Task so you can pick up the event and generate an informational alert with list of top memory consuming processes

NETWORKNAME – Should always be the local machine (localhost)
SLEEPTIME – milliseconds between samples (I tested with 2000)
 NumberOfSamples – How many sample (I tested with 5)