Using regular expressions to prevent a rule from running on a agent or agents
Often I see people asking how to prevent a rule or several rules from running on a agent or agents. It seems to be a common question. Rule over-rides do not disable rules from running on agents, but instead let you modify thresholds.
If you want to prevent a rule from running on a agent then you have to go into the criteria tab of the rule, and click on the advanced button. In the criteria selection you want to create something like this:
Agent does not equal %SERVERNAME%
Simple enough. How about a group of servers, say with a similar naming convention? Let’s say all our Exchange Bridgehead servers have BRD in their name. The criteria may look like this:
Agent does not match regular expression ^.*(BRD).*$
Easy right? Now lets make it so all Public Folder servers are excluded as well:
Agent does not match regular expression ^.*(BRD|PUB).*$
The above example expects that PUB is in the naming convention for your Public Folder servers.
You can get creative with regular expressions and they are a time saver. When I create computer groups I use them for domains and computers to add to the group. John Hann has a nice article on his blog describing regular expressions in more detail. Check it out: