A powershell script for resetting state of “manual reset” monitors

The script iterates through the state hierarchy of each monitoring
object in the management group and resets all “manual reset” monitors
that have been in “Error” or “Warning” state longer than the specified
max period for time in state.

The script is intended to run as a scheduled task. There are two
variables that need to be adjusted to match your environment:

$rms_name – set it to the name of your rms server
$MaxTimeInState – defines delay for resetting a manual reset monitor in hours