Friday, December 14, 2007

Case sensitive regex in SCOM

I went to create a new group in my SCOM environment based on computer name, the servers I want are named similar with the last character incremented. Into SCOM console I go, Authoring Groups Create a new group. For the dynamic members query, I enter "
( Object is Windows Computer AND ( Principal Name Matches regular expression wttsm.* ) AND True ) ". I finish the wizard and click View group members...; only 1 system "wttsm2" is showing. A quick look into the computer properties show the second machine as "WTTSM1", upper case....

Googling for case sensitive regex turns up http://www.exampledepot.com/egs/java.util.regex/Case.html, while it's for java it may still work. I change the query to "
( Object is Windows Computer AND ( Principal Name Matches regular expression (?i)wttsm.* ) AND True ) " and then check the members, both systems now appear.

Personally I don't know if case sensitive regex is a good thing in the SCOM rules, but at least now I know how to recover from it

No comments: