OpsMgr: How to create a group of all Windows Computers that are NOT a member of another group
<!--[if lt IE 9]>
<![endif]-->
Comments
Anonymous
January 01, 2003
Ijaz's error will occur if the group you are trying to delete is a member of a parent group. Take it out of the parent group and you will not get the error.Anonymous
January 01, 2003
The comment has been removed- Anonymous
May 05, 2017
:-)
- Anonymous
Anonymous
January 01, 2003
hi there, while it might be an old post, I just wanted to comment that in the wizard creation the last step is "Excluded members".So to re-take the steps from the example:-create first the group with the lab computers, the group name is "Lab computers"-create the group with the production server, with all servers, "production servers group"-on the last steps, Excluded members, in the first field "Search for:" look for the name of the group to exclude, so "Lab computers"- clic "Search" with the filter empty-the previously created group should appear in the available items list with it's UINameSpace ID-add it to the selected objects and you are done.I am not a big fan of editing the XML when I can do otherwise :) but if you check the xml created that was should match the one made manually.Regards,EricAnonymous
March 11, 2012
Thank you very much. Very appreciate !Anonymous
March 20, 2012
Reakky Good one . ThanksAnonymous
March 21, 2012
Nice one man!Anonymous
September 19, 2012
Hello Should both groups be in the same MP? or two sealed MPs? Could it be because the All and Except Groups are customized? unsealed MPs? Thnaks, DomAnonymous
September 19, 2012
<Discovery ID="UINameSpace4800d9bd07a84fefac35797e9f005312.Group.DiscoveryRule" Enabled="true" Target="UINameSpace4800d9bd07a84fefac35797e9f005312.Group" ConfirmDelivery="false" Remotable="true" Priority="Normal"> <Category>Discovery</Category> <DiscoveryTypes> <DiscoveryRelationship TypeID="MicrosoftSystemCenterInstanceGroupLibrary6172210!Microsoft.SystemCenter.InstanceGroupContainsEntities" /> </DiscoveryTypes> <DataSource ID="GroupPopulationDataSource" TypeID="SystemCenter!Microsoft.SystemCenter.GroupPopulator"> <RuleId>$MPElement$</RuleId> <GroupInstanceId>$MPElement[Name="UINameSpace4800d9bd07a84fefac35797e9f005312.Group"]$</GroupInstanceId> <MembershipRules> <MembershipRule> <MonitoringClass>$MPElement[Name="MicrosoftWindowsLibrary6172210!Microsoft.Windows.Computer"]$</MonitoringClass> <RelationshipClass>$MPElement[Name="MicrosoftSystemCenterInstanceGroupLibrary6172210!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass> <Expression> <NotContained> <MonitoringClass>$MPElement[Name="UINameSpace4f6f1f5d9d2c4d6cb7d85260ff63cd8e.Group"]$</MonitoringClass> </NotContained> </Expression> </MembershipRule> <MembershipRule> <MonitoringClass>$MPElement[Name="MicrosoftUnixLibrary617000273!Microsoft.Unix.Computer"]$</MonitoringClass> <RelationshipClass>$MPElement[Name="MicrosoftSystemCenterInstanceGroupLibrary6172210!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass> <Expression> <NotContained> <MonitoringClass>$MPElement[Name="UINameSpace3fe7d86445434da2bfd2606b07c296c5.Group"]$</MonitoringClass> </NotContained> </Expression> </MembershipRule> </MembershipRules> </DataSource> </Discovery>Anonymous
September 19, 2012
if I have multiple exclusion how should I handle them? <Expression> <NotContained> <MonitoringClass>$MPElement[Name="UINameSpace3fe7d86445434da2bfd2606b07c296c5.Group"]$</MonitoringClass> <MonitoringClass>$MPElement[Name="UINameSpacec879c5e395434c858796f9c10de541dd.Group"]$</MonitoringClass> </NotContained> does not seem to work as the MP could not be imported anymore !!! Thanks, DOmAnonymous
September 19, 2012
Hello, in progress... BUT!!! (: apparently Multiple expressions needs to be entered each of them as simple exp[ression and liked by the AND and OR logical operatos. <Expression> <And> <Expression> <NotContained> <MonitoringClass>$MPElement[Name="UINameSpace3fe7d86445434da2bfd2606b07c296c5.Group"]$</MonitoringClass> </NotContained> </Expression> <Expression> <NotContained> <MonitoringClass>$MPElement[Name="UINameSpacec879c5e395434c858796f9c10de541dd.Group"]$</MonitoringClass> </NotContained> </Expression> </And> </Expression> is accepted at the compilation and the import of the MP works ... but still no exclusion in the group!!!! Thanks, DOmAnonymous
September 19, 2012
Hello, After 2 hours finally the exclusions are active ... why this long delay !!!! Thnaks, DomAnonymous
September 19, 2012
Hello, Now trying to add a second group as excluded!!! Apparently the <And></And> do not compile .... the import is failing !!! Thanks, DomAnonymous
September 20, 2012
Hello, Recreating the group from scratch trying to use blogs.technet.com/.../how-to-create-a-group-of-objects-that-are-contained-by-some-other-group.aspx to have multiple exclusions replacing "CONTAINED" by <NOTCONTAINED> using the <AND></AND>... Thanks, DOmAnonymous
September 20, 2012
Hello, Trying again to make the exclusions on Multiple Groups... <MembershipRules> <MembershipRule> <MonitoringClass>$MPElement[Name="MicrosoftWindowsLibrary6172210!Microsoft.Windows.Computer"]$</MonitoringClass> <RelationshipClass>$MPElement[Name="MicrosoftSystemCenterInstanceGroupLibrary6172210!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass> <Expression> <And> <Expression> <NotContained> <MonitoringClass>$MPElement[Name="UINameSpacec879c5e395434c858796f9c10de541dd.Group"]$</MonitoringClass> </NotContained> </Expression> <Expression> <NotContained> <MonitoringClass>$MPElement[Name="UINameSpace3fe7d86445434da2bfd2606b07c296c5.Group"]$</MonitoringClass> </NotContained> </Expression> </And> </Expression> </MembershipRule> </MembershipRules> </DataSource> Still nothing after 1 hour ... Waiting ... Thanks, DomAnonymous
October 23, 2012
Is this process any different that using the Excluded Objects feature from the Excluded Members tab ? Also, this is still a group of computer objects only so how would I, for example, trigger a notification via subscription for the "Health Service Heartbeat Failure" monitor in the "Health Service Watcher" target ? I find that while that alert triggers and shows in the console, I can NOT get it to notify via subscription when the subscription's criteria uses "raised by any instance in a specific group" and that group holds only computer objects.Anonymous
February 26, 2013
Import fails after modification of xml as suggessted on SCOM 2012. Getting following error: Error 1: Found error in 1|CGCriticalOverrideGroup|1.0.0.0|UINameSpaced02104559e1b41928eb522990fc37ad9.Group.DiscoveryRule/GroupPopulationDataSource|| with message: The configuration specified for Module GroupPopulationDataSource is not valid. : Cannot find specified MPElement UINameSpacee83aa59e51884c9c9adf45bda79f5a2a.Group in expression: $MPElement[Name="UINameSpacee83aa59e51884c9c9adf45bda79f5a2a.Group"]$ Cannot find ManagementPackElement [Type=ManagementPackElement, ID=UINameSpacee83aa59e51884c9c9adf45bda79f5a2a.Group] in management pack ManagementPack:[Name=CGCriticalOverrideGroup, KeyToken=, Version=1.0.0.0].
Anonymous
November 14, 2013
Hi Kevin, geat post. Just a query - can this dynamic membership model based on AD OU's be used in conjuction with your post on the SQL MP RunAs accounts configuration. I'm looking at Scenario 5 which is the more complex version where we have a mix of Internally maintained SQL and 3rd Party maintained. Our SQL dba is primaritly interested in the internal ones (which are in a specific OU) and therefor I was going to base a Runas account around that group membership and then possibly configure a secont SQL RunAs for the 3rd party manged SQL which will likely have different SQL security/hardening aplied. So If I can target a group which is based on OU menbership this will be very useful. Anh advice much appreciated...Cheers...Anonymous
November 14, 2013
From above forgot to add - if it IS possible, then does the distribution still need to be manually refreshed (and associated profiles) as the OU membership will be chnaging over time as new SQL servers come in and old are decommissioned?...Anonymous
November 14, 2013
I am struggling with how to implement this in our enviornment and am hoping you can help. My team uses a shared SCOM enviornment where we have two servers groups, stored in the same custom management pack, that are used for different alerting purposes. One group is for 7x24 alerting where we want to get paged at all hours of the night for those servers, and the other group is for non-7x24 alerting where we only want alerts during certain times of the day. The caveat is that we only want specific servers in our 7x24 group and are trying to use a combination of dynamic membership AND computers not in the non-7x24 group. Here is our syntax: <MembershipRules> <MembershipRule> <MonitoringClass>$MPElement[Name="A304a3f11ff204a26baf2d8c642711598!System.Entity"]$</MonitoringClass> <RelationshipClass>$MPElement[Name="MicrosoftSystemCenterInstanceGroupLibrary7585010!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass> <Expression> <And> <Expression> <NotContained> <MonitoringClass>$MPElement[Name="UINameSpace090f65ab906f41188efc4d71f59ac31c.Group"]$</MonitoringClass> </NotContained> </Expression> <Expression> <Or> <Expression> <RegExExpression> <ValueExpression> <Property>$MPElement[Name="A304a3f11ff204a26baf2d8c642711598!System.Entity"]/DisplayName$</Property> </ValueExpression> <Operator>ContainsSubstring</Operator> <Pattern>SRVSITE1</Pattern> </RegExExpression> </Expression> <Expression> <RegExExpression> <ValueExpression> <Property>$MPElement[Name="A304a3f11ff204a26baf2d8c642711598!System.Entity"]/DisplayName$</Property> </ValueExpression> <Operator>ContainsSubstring</Operator> <Pattern>SRVSITE9</Pattern> </RegExExpression> </Expression> </Or> </Expression> </And> </Expression> </MembershipRule> </MembershipRules>Anonymous
November 14, 2013
The names above have been genercised to show that we only want certain servers in the 7x24 group, even if they are not in the non-7x24 group, and not all servers in our enviornment. I thought the syntax of "not in the group" AND "any one of these OR conditions" would work but even after an hour+ the 7x24 group shows 0 members. When I reimport the old management pack it goes back to showing all of the servers the way it did previously. I think either you can't do what I am trying to do, I shouldn't be storing both groups in the same management pack, or I am not using the syntax correctly. Can you please let me know what you think we should to get this working?Anonymous
February 07, 2014
In response to Dan above. You should have both groups in the same management pack for this to work. When using a group for exclusion (non 7x24) you must make sure that you are using the OR group instead of the AND group function. Looking at your management pack XML that you posted it seems that the NotContained expression is in the wrong spot. I put together a full write up on using 7x24 and non 7x24 toexclude a group of objects from another group of objectsAnonymous
May 13, 2014
Pingback from Microsoft Exchange Server 2013 discovery. « JAMA00Anonymous
May 13, 2014
Hi Kevin, I know this is an old post, but I was able to successfully implement this. I want to add another group to the "NotContained" but keep getting failures when adding another UIName. Do you have any tips for me to add another UIName?
ThanksAnonymous
September 09, 2014
@Eric Bonin - I was struggling to exclude with XML mod and had no issues doing via the GUI option you highlighted. Thanks!Anonymous
October 08, 2015
I struggled with the XML for a multi-group exclude; I tried both "and" and "or" exclusion groups, and I was still getting the entire server list, not the filtered list I was expecting. Finally I read through the comments to see if there was anything useful, and found Eric Bonin's comment above. Using the GUI as he described, I got it working instantly. If this is a new feature (this post was originally written in 2012), perhaps a note to this effect could be edited into the top of the blog post so future visitors don't go through the same pain?Anonymous
May 10, 2016
Hi i have an issue i newly installed SCOM 2012 .when i am checking default group for Servers "Windows servers computer group " its members also contains windows 7 PC'S.