As part of a new environment that I am working in we are looking for the ability to automatically perform functions for servers which are added into the environment. As an example of this we automated the deployment of the Operations Manager agent for servers in this environment as discussed in http://ops-mgr.spaces.live.com/blog/cns!3D3B8489FCAA9B51!1034.entry. Our next step was to create a method to automatically categorize our servers based upon different tiers of servers which we defined within the environment. This tiering approach will then be integrated with OpsMgr to provide groups so that specific users can see only the tier of the servers which are relevant to them. For the ConfigMgr environment this will also provide us with some additional functionality including the ability to create collections based upon the tier that is defined for the server.

The vision for this was that when a new server is deployed, information is stored in the registry which provides specific details about that server (tier number, server owner, backup requirements, anti-virus exclusions, maintenance windows, etc). This information is then retrieved through a custom attribute in OpsMgr and through extensions to the inventory on the ConfigMgr side. So how do we make this work in OpsMgr? Custom attributes in OpsMgr can be identified for either registry keys or from WMI information. We decided to go with a registry key as that is a relatively simple to implement on the ConfigMgr side as well.

We first added the new registry key to a test system. We created under HKLM/System a custom key specific to the name of the company. For the purposes of this example we will list it as ClientName (original eh?).

Next we create the new attribute to the HKLM/System/ClientName/TierNumber (reg_sz) key. We added this to the appropriate custom management pack (ClientNameAttributes) as part of the WindowsComputer_Extended class.

Under Authoring \ Management Pack Objects \ Attributes:

New Attribute

Name: ClientName Server Tier Number

Description: The KHLM/ClientName/TierNumber REG_SZ field

Discovery type: Registry

Target: Windows Computer_ClientNameAttributes

Management Pack: ClientNameAttributes

Key or value? Value

Path: hkey_local_machine\system\ClientName\TierNumber

Attribute Type: String

Frequency: 3600 seconds (1 hour) – may raise this to check daily.

Next we create the group for these servers. This is done under Authoring \ Groups:

Name: ClientName Tier1 Servers

Description: Servers identified as Tier1 based upon the hkey_local_machine\system\ClientName\TierNumber registry key.

Management Pack: ClientNameAttributes

Dynamic Members, Edit Rules, choose Windows Computer_ClientNameAttributes

Add ClientName Server Tier Number Equals 1

Create the group.

Next we needed to check the group members to verify functionality.

In the Monitoring \ ClientNameAttributes folder, create a new State View called “ClientName Tier1 Servers”

Based upon the criteria defined in Windows Computer_ClientNameAttributes with specific ClientName Server Tier Number value=1.

Created a view for state in the ClientNameAttributes folder for Tier1. (need to wait at least the frequency time before this group will populate which was one hour).

For our organization we have a total of four tiers defined so we will be creating four different groups based upon the Tier Number value as shown in the criteria above. We expect to use this approach to integrate more custom registry values which will allow us to become even more specific in what we group on which in turn will allow us to more tightly control what specific users will see within the OpsMgr console. So far I’ve been really impressed with what we have been able to accomplish with this functionality, and look forward to being able to do things like automatically categorize servers into their appropriate maintenance windows based upon the information in the registry! (I may blog when we get that one working as well).

Good additional reading on the topic of attributes is available from Kevin Holman at: http://blogs.technet.com/kevinholman/archive/2008/07/29/how-do-i-know-if-i-have-all-the-required-hotfixes-on-windows-server-2008-to-be-supported-for-a-opsmgr-agent.aspx

Also, I owe a huge thanks to John Joyner for starting me down this path! Thank you John!