none
Dynamic Group based on SCOM group and DNS Domain RRS feed

  • Question

  • Hi!

    I'd like to create a dynamic group based on:

    1. Membership in another existing larger SCOM group with alot of different computers in various domains

    2. DNS Domain name

    The purpose of this is to filter out specific computers to a group and then associate that group for a specific Run As account. Is this possible? Or do you have any other suggestion to accomplish that?

    Cheers!

    Monday, October 22, 2018 9:14 AM

Answers

All replies

  • You absolutely can do this, Kevin Holman has an article about something very similar : https://blogs.technet.microsoft.com/kevinholman/2014/04/09/creating-groups-of-health-service-watcher-objects-based-on-other-groups/
    • Proposed as answer by Sameer Mhaisekar Monday, October 22, 2018 12:08 PM
    • Marked as answer by RonHextall Wednesday, October 24, 2018 6:19 AM
    Monday, October 22, 2018 9:44 AM
  • Thanks for your reply!

    Im fairly new to xml and I dont quite get it, do I need to input these MembershipRule tags in a new xml MP containg my main group in it? I got an error importing it referring to the MonitoringClass for the group so I guess Im way off :)


    <MembershipRule>   
     <MonitoringClass>$MPElement[Name="SystemCenter!Microsoft.SystemCenter.AllComputersGroup"]$</MonitoringClass>
    <RelationshipClass>$MPElement[Name="MicrosoftSystemCenterInstanceGroupLibrary7585010!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>
          <Expression>
            <Contains>
     <MonitoringClass>$MPElement[Name="SystemCenter!Microsoft.SystemCenter.AllComputersGroup"]$</MonitoringClass>
              <Expression>
                <Contained>
                  <MonitoringClass>$MPElement[Name="My large SCOM group name"]$</MonitoringClass>
                </Contained>
              </Expression>
            </Contains>
          </Expression>
    </MembershipRule>

    <MembershipRule>
                  <MonitoringClass>$MPElement[Name="MicrosoftWindowsServerDNS10064!Microsoft.Windows.Server.DNS.DNSDomain"]$</MonitoringClass>
                  <RelationshipClass>$MPElement[Name="MicrosoftSystemCenterInstanceGroupLibrary7585010!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <Property>$MPElement[Name="MicrosoftWindowsServerDNS10064!Microsoft.Windows.Server.DNS.DNSDomain"]/DomainName$</Property>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value>domain.local</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
    </MembershipRule>


    Monday, October 22, 2018 12:50 PM
  • >>I got an error importing it referring to the MonitoringClass for the group so I guess Im way off :)
    What is your error when importing modified MP into SCOM?
    Moreover, make sure that "My large SCOM group name" and your dynamic group save in same MP
    Roger
    Tuesday, October 23, 2018 3:14 AM
  • Thanks! I'll save it in the same MP.

    -------------------------------------------------------
    Error 1:
    Found error in 1|Test2.Domain.Group.SQL|1.0.0.0|UINameSpace2a1b1a44382b4e3ba09d1092c55c50ec.Group.DiscoveryRule/GroupPopulationDataSource|| with message:
    The configuration specified for Module GroupPopulationDataSource is not valid.
    : Incorrect expression specified: $MPElement[Name=My Group Name]. Unable to resolve this expression. Check the expression for errors. (Hints:  Check for correct character casing (upper case/lower case), mismatched "$" signs, double quotes("), square brackets "[" or "]"). Here is a sample expression: $MPElement[Name="Windows!Microsoft.Windows.Computer"]/NetworkName$

    -------------------------------------------------------


    Tuesday, October 23, 2018 5:56 AM
  • Is this only doable through xml editing? 
    • Edited by RonHextall Tuesday, October 23, 2018 6:03 AM
    Tuesday, October 23, 2018 6:02 AM
  • You need to use quotes around your group name, and also this is supposed to be the Name and not displayname (so very likely a long, semi-randomly generated string if you created the group in the console).

    And yes, unfortunately this is only doable through xml.

    Tuesday, October 23, 2018 6:10 AM
  • You need to use quotes around your group name, and also this is supposed to be the Name and not displayname (so very likely a long, semi-randomly generated string if you created the group in the console).

    And yes, unfortunately this is only doable through xml.

    You can find the group name and other properties with 

    Get-SCOMGroup -DisplayName "Your group" | fl

    Hope this helps

    Cheers


    Sam (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" wherever applicable. Thanks!) Blog:AnalyticOps Insights Twitter:Sameer Mhaisekar

    Tuesday, October 23, 2018 6:18 AM
  • Thanks Sameer, it did! Made some progress now I think.

    Ill try to tinker with this in our lab env since it's a hugely important MP for us. Any other tips is highly appreciated. :)


    • Edited by RonHextall Tuesday, October 23, 2018 6:59 AM
    Tuesday, October 23, 2018 6:44 AM
  • You're welcome :)

    Did you manage to get it working? We'll be happy to assist if you run into errors again.

    Cheers


    Sam (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" wherever applicable. Thanks!) Blog:AnalyticOps Insights Twitter:Sameer Mhaisekar

    Tuesday, October 23, 2018 6:55 AM
  • Im giving up on this, it's too much of a hazzle to configure it since we've got 20-25 domains and they change from time to time, Im better off just creating groups and add those servers the normal way. Thanks for all of your help tho!
    Wednesday, October 24, 2018 6:19 AM
  • Just to be sure that there is no easier solution to your problem, can you show us a screenshot of the dynamic criteria used for your "big group" ?

    It may be possible to create groups for each domain using a similiar dynamic criteria with a simple extra line, using parent's properties...

    Wednesday, October 24, 2018 9:10 AM
  • Hi CyrAz!

    That group is not dynamic, it's just a normal group with manually added Window Computer objects.

    Wednesday, October 24, 2018 11:57 AM