ConfigMgr Collection based on Installed Windows Server Features and Roles
Sometimes it is necessary to create a collection based on what Windows Server Features and Roles have been installed on a server. For instance, I have a customer that is using System Center Endpoint Protection to protect their servers from malware. Therefore we want to have collections that are automatically updated if for instance an operator installs a new machine as a domain controller, web server et cetera.
What we did was that we created a collection that has a query rule to include systems that has a specific server role installed, then includes that collection to a collection that has the specific exclusions deployed to it. The include collection part was simply due to the customers complex scenario.
The query rule looks like the following
select * from SMS_R_System inner join SMS_G_System_SERVER_FEATURE on SMS_G_System_SERVER_FEATURE.ResourceID = SMS_R_System.ResourceID where SMS_G_System_SERVER_FEATURE.ID = 140
Server feature with ID 140 is translated into IIS.
To find out different feature id’s, we simply ran the following WQL as a query, but I’m sure the information is available on the internet.
select SMS_G_System_SERVER_FEATURE.Name, SMS_G_System_SERVER_FEATURE.ID, SMS_G_System_SERVER_FEATURE.ParentID, SMS_G_System_SERVER_FEATURE.GroupID from SMS_R_System inner join SMS_G_System_SERVER_FEATURE on SMS_G_System_SERVER_FEATURE.ResourceID = SMS_R_System.ResourceID where SMS_R_System.Name = “HOSTNAME” order by SMS_G_System_SERVER_FEATURE.Name DESC
Remember to change “HOSTNAME” to the name of a server that has the feature you are looking up.
/Tim
No Comments