I recently received a request to write a script for monitoring IIS websites and their application pools on a specific Windows 2012 R2 server and start them if they were stopped. This is something I created fairly quickly and thought I would share.
I always try to centralize any scripts I write and have them run on a job server instead of the actual server they're querying. That way I don't have multiple versions of the same script floating around on different servers.
↧