Grouping objects dynamically is a common request I hear, and grouping hard drives based on drive letter and host computer name the most common amongst those. Here is the best way to perform this grouping based on my experience. I have provided screenshots of the dynamic grouping interface and resulting.
- In the Authoring space, browse to Groups.
- Create a group and provide desired name. On the Explicit Members screen, leave blank and click Next.
- On the Dynamic Members screen, set the following formula, setting the object display name to meet your needs.
- From the Class drop-down, choose Windows Logical Hardware Component, then click the Add button (as shown in the figure below).
- Choose the Display Name field from the drop-down, and set it’s value equal to the display name of the drive you wish to group, such as C:.
TIP: Find your drive display names by viewing the properties of objects using the Discovered Inventory View.
While I used “Logical Hardware Component” in this example, you could also use “Logical Drive (Server)” among others as the target class. You can see properties such as Size (in bytes), which would allow you dynamically group based on other properties, such as drive size rather than display name.
- In the second dropdown, choose Windows Computer NetBIOS name. Set comparison operator to matches wildcard, and then type a wildcard representing the naming convention you want to match. Just a word of warning – this comparison seems to be case sensitive.
For example, to match the computer name OPSMGR, I used a formula value of *PSMG*|*psmg*, which would match the upper case or lower case versions of the string. (The pipe symbol | represents the OR operator in a wildcard comparison such as this).
The resulting formula looks something like this:
When finished, click OK. Right click the group and select View Membership to see the results of your work.
Additional Resources on OpsMgr Groups
There are several tutorials on creation of dynamic groups covering a number of scenarios:
- Update: Dynamic group population based on multiple criteria in OpsMgr 2007 [HOW-TO]
- Grouping by Registry Key
Based on Active Directory-related characteristics
- Create a computer group for systems without an AD Site in OpsMgr
- Groups Based on Organizational Unit (OU)
Using Regular Expressions
- Dynamic Group Population by Subnet(s) in SCOM 2007 – Advanced Formula Examples
- Creating dynamic computer groups using regular expressions in OpsMgr
Created using advanced formulas in XML
- SCOM: Advanced Group Population Formula Development (GroupCalc) for the XML Impaired
- Dynamic Grouping of Health Watcher in an Active Directory OU