<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx</link><description>Boris wrote a cool article HERE on how to populate a group of computers in OpsMgr, from an external source…. such as active directory. In his published example – you run an LDAP query to AD, to return a recordset list if computers, in order to populate</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3192439</link><pubDate>Wed, 28 Jan 2009 01:43:03 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3192439</guid><dc:creator>SteveH</dc:creator><description>&lt;p&gt;I used something similar to this to create a &amp;quot;Critical Servers List&amp;quot;. But I did not use a DB but a text file sitting on the RMS.&lt;/p&gt;
&lt;p&gt;This allowed me to monitor our whole environment but only be alerted in the middle of the night for critical servers.&lt;/p&gt;
</description></item><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3193877</link><pubDate>Wed, 28 Jan 2009 22:28:23 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3193877</guid><dc:creator>Nomad</dc:creator><description>&lt;p&gt;Fantastic post. &amp;nbsp;We needed this about a year ago.&lt;/p&gt;
</description></item><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3196095</link><pubDate>Tue, 03 Feb 2009 01:03:51 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3196095</guid><dc:creator>ziembor</dc:creator><description>&lt;p&gt;nice. But I would rather prefer see such &amp;quot;manual&amp;quot; using Autoring console :) &lt;/p&gt;
</description></item><item><title>re: use the auth console</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3196108</link><pubDate>Tue, 03 Feb 2009 01:36:32 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3196108</guid><dc:creator>kevinhol</dc:creator><description>&lt;p&gt;I agree. &amp;nbsp;I plan to document just that.... would be nice - huh?&lt;/p&gt;
</description></item><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3214552</link><pubDate>Wed, 18 Mar 2009 12:07:29 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3214552</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;HI&lt;/p&gt;
&lt;p&gt;I try create group which contain agent with heartbeat failures.&lt;/p&gt;
&lt;p&gt;But have problem. Could you view &amp;nbsp;my MP and may be you see wrong code ?&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt; &amp;lt;TypeDefinitions&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;EntityTypes&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ClassTypes&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ClassType ID=&amp;quot;GroupPopulation.Team1Group&amp;quot; Accessibility=&amp;quot;Internal&amp;quot; Abstract=&amp;quot;false&amp;quot; Base=&amp;quot;System!System.Group&amp;quot; Hosted=&amp;quot;false&amp;quot; Singleton=&amp;quot;true&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/ClassTypes&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;RelationshipTypes&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;RelationshipType ID=&amp;quot;GroupPopulation.Team1GroupContainsWindowsComputers&amp;quot; Accessibility=&amp;quot;Internal&amp;quot; Abstract=&amp;quot;false&amp;quot; Base=&amp;quot;System!System.Containment&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Source&amp;gt;GroupPopulation.Team1Group&amp;lt;/Source&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Target&amp;gt;SC!Microsoft.SystemCenter.AgentWatcher&amp;lt;/Target&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/RelationshipType&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/RelationshipTypes&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/EntityTypes&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/TypeDefinitions&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;Monitoring&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Discoveries&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Discovery ID=&amp;quot;Team1Group.Discovery&amp;quot; Enabled=&amp;quot;true&amp;quot; Target=&amp;quot;SC!Microsoft.SystemCenter.RootManagementServer&amp;quot; ConfirmDelivery=&amp;quot;true&amp;quot; Remotable=&amp;quot;true&amp;quot; Priority=&amp;quot;Normal&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Category&amp;gt;Discovery&amp;lt;/Category&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;DiscoveryTypes&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;DiscoveryClass TypeID=&amp;quot;GroupPopulation.Team1Group&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/DiscoveryTypes&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;DataSource ID=&amp;quot;DS&amp;quot; TypeID=&amp;quot;Windows!Microsoft.Windows.TimedScript.DiscoveryProvider&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;IntervalSeconds&amp;gt;120&amp;lt;/IntervalSeconds&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;SyncTime /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ScriptName&amp;gt;Team1GroupDiscoverynew.vbs&amp;lt;/ScriptName&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Arguments&amp;gt;$MPElement$ $Target/Id$&amp;lt;/Arguments&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ScriptBody&amp;gt;&amp;lt;![CDATA[Dim SourceId&lt;/p&gt;
&lt;p&gt;Dim objConnection&lt;/p&gt;
&lt;p&gt;Dim oRS&lt;/p&gt;
&lt;p&gt;Dim sConnectString&lt;/p&gt;
&lt;p&gt;Dim ManagedEntityID&lt;/p&gt;
&lt;p&gt;Dim oAPI&lt;/p&gt;
&lt;p&gt;Dim oDiscoveryData&lt;/p&gt;
&lt;p&gt;SourceId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= WScript.Arguments(0)&lt;/p&gt;
&lt;p&gt;ManagedEntityId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = WScript.Arguments(1)&lt;/p&gt;
&lt;p&gt;Set oAPI &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= CreateObject(&amp;quot;MOM.ScriptAPI&amp;quot;)&lt;/p&gt;
&lt;p&gt;Set oDiscoveryData &amp;nbsp; &amp;nbsp; &amp;nbsp;= oAPI.CreateDiscoveryData(0,SourceId,ManagedEntityId)&lt;/p&gt;
&lt;p&gt;sConnectString = &amp;quot;Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=OperationsManager;Data Source=.&amp;quot;&lt;/p&gt;
&lt;p&gt;Set objConnection = CreateObject(&amp;quot;ADODB.Connection&amp;quot;)&lt;/p&gt;
&lt;p&gt;objConnection.Open sConnectString&lt;/p&gt;
&lt;p&gt;Set oRS = CreateObject(&amp;quot;ADODB.Recordset&amp;quot;)&lt;/p&gt;
&lt;p&gt;oRS.Open &amp;quot;SELECT ManagedEntityGenericView.Id FROM ManagedEntityGenericView INNER JOIN ManagedTypeView ON ManagedEntityGenericView.MonitoringClassId = ManagedTypeView.Id WHERE (ManagedEntityGenericView.IsAvailable = 'false') AND (ManagedTypeView.Name = 'Microsoft.SystemCenter.Agent') ORDER BY ManagedEntityGenericView.AvailabilityLastModified &amp;quot;, objConnection&lt;/p&gt;
&lt;p&gt;Set groupInstance = oDiscoveryData.CreateClassInstance(&amp;quot;$MPElement[Name='GroupPopulation.Team1Group']$&amp;quot;)&lt;/p&gt;
&lt;p&gt;While Not oRS.EOF&lt;/p&gt;
&lt;p&gt;Set serverInstance = oDiscoveryData.CreateClassInstance(&amp;quot;$MPElement[Name='SC!Microsoft.SystemCenter.AgentWatcher']$&amp;quot;)&lt;/p&gt;
&lt;p&gt;serverInstance.AddProperty &amp;quot;$MPElement[Name='SC!Microsoft.SystemCenter.HealthServiceWatcher']/HealthServiceId$&amp;quot;,oRS.Fields(&amp;quot;Id&amp;quot;)&lt;/p&gt;
&lt;p&gt;serverInstance.AddProperty &amp;quot;$MPElement[Name='SC!Microsoft.SystemCenter.HealthServiceWatchersGroup']/WatcherGroupName$&amp;quot;,&amp;quot;Microsoft.SystemCenter.AgentWatchersGroup&amp;quot;&lt;/p&gt;
&lt;p&gt;Set relationshipInstance = oDiscoveryData.CreateRelationshipInstance(&amp;quot;$MPElement[Name='GroupPopulation.Team1GroupContainsWindowsComputers']$&amp;quot;)&lt;/p&gt;
&lt;p&gt;relationshipInstance.Source = groupInstance&lt;/p&gt;
&lt;p&gt;relationshipInstance.Target = serverInstance&lt;/p&gt;
&lt;p&gt;'Set serverInstance = oDiscoveryData.CreateClassInstance(&amp;quot;$MPElement[Name='SC!Microsoft.SystemCenter.AgentWatcher']$&amp;quot;)&lt;/p&gt;
&lt;p&gt;'serverInstance.AddProperty &amp;quot;$MPElement[Name='SC!Microsoft.SystemCenter.HealthServiceWatcher']/HealthServiceId$&amp;quot;,oRS.Fields(&amp;quot;Id&amp;quot;)&lt;/p&gt;
&lt;p&gt;'serverInstance.AddProperty &amp;quot;$MPElement[Name='SC!Microsoft.SystemCenter.HealthServiceWatchersGroup']/WatcherGroupName$&amp;quot;,&amp;quot;{8dd68103-6ee8-2654-2c32-bb9339a8e53b}&amp;quot;&lt;/p&gt;
&lt;p&gt;'Set relationshipInstance = oDiscoveryData.CreateRelationshipInstance(&amp;quot;$MPElement[Name='GroupPopulation.Team1GroupContainsWindowsComputers']$&amp;quot;)&lt;/p&gt;
&lt;p&gt;'relationshipInstance.Source = groupInstance&lt;/p&gt;
&lt;p&gt;'relationshipInstance.Target = serverInstance&lt;/p&gt;
&lt;p&gt;'oDiscoveryData.AddInstance relationshipInstance&lt;/p&gt;
&lt;p&gt;oRS.MoveNext&lt;/p&gt;
&lt;p&gt;Wend&lt;/p&gt;
&lt;p&gt;objConnection.Close&lt;/p&gt;
&lt;p&gt;Call oAPI.Return(oDiscoveryData)]]&amp;gt;&amp;lt;/ScriptBody&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;TimeoutSeconds&amp;gt;120&amp;lt;/TimeoutSeconds&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/DataSource&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Discovery&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Discoveries&amp;gt;&lt;/p&gt;
&lt;p&gt;.....&lt;/p&gt;
&lt;p&gt;The group is empety, and I have error 33333 and 10801 (about &amp;nbsp;Invalid relationship target specified in the discovery data item.)&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3214556</link><pubDate>Wed, 18 Mar 2009 12:11:25 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3214556</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;oops&lt;/p&gt;
&lt;p&gt;'oDiscoveryData.AddInstance relationshipInstance&lt;/p&gt;
&lt;p&gt;without ' &lt;/p&gt;
&lt;p&gt;but problem not resolved yet.&lt;/p&gt;
</description></item><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3222206</link><pubDate>Sat, 04 Apr 2009 02:21:36 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3222206</guid><dc:creator>ziembor</dc:creator><description>&lt;p&gt;How to avoid &amp;nbsp;error: 'The group can not be modified becouse trere is no group population rule' on OM Console/Authoring/Groups/Properies?&lt;/p&gt;
</description></item><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3227643</link><pubDate>Fri, 17 Apr 2009 18:03:30 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3227643</guid><dc:creator>mccocha</dc:creator><description>&lt;p&gt;I am having the same problem with 'The group can not be modified because there is no group population rule' when attempting to view the properties of my group. &amp;nbsp;Additionally, no group members are created.&lt;/p&gt;
</description></item><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3247243</link><pubDate>Thu, 28 May 2009 23:30:31 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3247243</guid><dc:creator>jg</dc:creator><description>&lt;p&gt;This is very cool but I would like to read in from a text or csv. What would be the syntax to read in from a csv file?&lt;/p&gt;
</description></item><item><title>re: text or CSV</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3247249</link><pubDate>Thu, 28 May 2009 23:38:11 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3247249</guid><dc:creator>kevinhol</dc:creator><description>&lt;p&gt;That would simply be a modification to the VBscript - instead of querying SQL for your recordset - you parse the text file. &amp;nbsp;There are lots of examples on the web for this.&lt;/p&gt;
</description></item><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3253694</link><pubDate>Fri, 12 Jun 2009 00:03:28 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3253694</guid><dc:creator>shall@troweprice.com</dc:creator><description>&lt;p&gt;This is very nice. &amp;nbsp;However, I'm getting a &amp;quot;ADODB.Connection: Provider is not specified and there is no designated default provider.&amp;quot; error. &amp;nbsp;This is likely a 64-bit RMS issue. &amp;nbsp;Anyone have a solution?&lt;/p&gt;
</description></item><item><title>re: Populating groups from a SQL server CMDB – step by step</title><link>http://blogs.technet.com/kevinholman/archive/2009/01/27/populating-groups-from-a-sql-server-cmdb-step-by-step.aspx#3253722</link><pubDate>Fri, 12 Jun 2009 02:41:27 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3253722</guid><dc:creator>shall@troweprice.com</dc:creator><description>&lt;p&gt;Problem solved: &amp;nbsp;Used this:&lt;/p&gt;
&lt;p&gt;sConnectString = &amp;quot;Provider=SQLOLEDB;User ID=&amp;lt;username&amp;gt;;Password=&amp;lt;Password&amp;gt;;Initial Catalog=&amp;lt;database&amp;gt;;Data Source=&amp;lt;server\Instance&amp;gt;;Network Library=DBMSSOCN;&amp;quot; &lt;/p&gt;
</description></item></channel></rss>