Top CPU Processes to OpsMgr Event Log

Script finds top processes 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 CPU processes

Written by user request. see original discussion HERE

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