Kevin Holman's System Center Blog

Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of UseAre you interested in having a dedicated engineer that will be your Mic

Creating a Group based on OU (Organizational Unit) in Active Directory

Creating a Group based on OU (Organizational Unit) in Active Directory

  • Comments 8
  • Likes

 

Here is a really cool feature of Opsmgr:  the ability to create groups easily based on any discovered attribute of an object.

 

OU is something that is part of the Windows Computer object discovery.  If you examine a state view – you will see in the details pane discovered information… and OU is there.  Typically this means we can likely use that object (Windows Computer) and OU will be a discovered attribute of that.

 

clip_image002

 

 

This also means is we personalize a Windows Computer based state view – we can add OU:

clip_image002[5]

 

 

To use a grouping, create a group, add Windows Computer object, and then a rule based on OU:

clip_image004

clip_image006

 

 

A right click – view group members reveals:

clip_image008

Comments
  • Hi Kevin

    Just be aware that if you create an alert view that is scoped to your dynamic group, you won't see health alerts (e.g. server or agent down) in the alert view as the health service watcher is not part of the computer class. You'll need to hack the xml code in your management pack to include the health service as a 'contained' element of the group (it can't be done via the UI).

    Cheers

    Graham

  • Can you give an example on how to edit the XML code in the management pack. so alert views for the dynamic group can be seen?

    Thanks.

  • Shoot me an email please with the details of what you are trying to do - I dont completely follow

  • hi Kevin

    The problem with this approach is that the dynamic group does not include the health service of the computers being monitored. So if you create views based on the dynamic groups (or notifications), health service alerts (e.g. missed heartbeat) won't be included. See

    http://www.scom2k7.com/dynamic-computer-groups-that-send-heartbeat-alerts/

    Cheers

    Graham

  • For dynamic groups is it possible to edit the XML to automatically add other objects e.g. Dynamic query finds servers on IP and then adds IIS role, and Exchange Role

  • Hi,

    I wish I could to make a dynamic group of all computer in 2003 Server which have a specific Service that running on it.

    Can you Help me?

    Regards

    JD

  • That's pretty easy...  you can extend Windows Server 2003 Operating system class... and create a registry attribute for the existance of that service.  

    Then - create a group based on that attribute = true.

  • Nice article. Question, is it possible to create a class based on discovered attribute of objects? As in your example, you created a group based on OU structure. Can I create a class (from Microsoft.Windows.LocalApplication) based on the OU structure too?

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Search Blogs