OpsMgr: Creating a monitor to determine if a FOLDER exists (sample script and tutorial)

Recently a user in the SCC OpsMgr community forums wanted to monitor for the existence of a file. With many similar file system related scripts (file and folder size, count, age, etc.) but no exact match, I put together a quick sample to the job, which you can find HERE. Another reader saw that sample and asked for the same script, but for existence of a folder…so here it is.

The sample is VBScript, as this can be easily implemented in the Operations 2007 / 2012 consoles, where PowerShell requires time and authoring skills. The sample script below is intended for use in a two state script monitor in any version of OpsMgr 2007 or 2012.

Here’s a how-to for creating a two state script monitor How to create a Script-based 2-State Monitor

And a relatively simple sample script and a few additional scripting resources for OpsMgr and System Center

Sample Script

Additional Resources

We have quite a collection of scripts here on System Center Central from some of the communities best and brightest, which you can find at the links below:

Links: OpsMgr 2007 / 2012 Scripting Articles at System Center Central

Master Collection of System Center PowerShell

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.