Great plugin – Missing return code for Alert

I’ve been using this plugin to monitor a windows process but when it reported CRITICAL nagios would not change the State. Turns out the plugin was not returning the State and it would default to 0 meaning “OK”.
To fix this, add the following line to the end of the ps1 file

exit $Status