Posts

Showing posts with the label SCCM Collections Query

SCCM: How to exclude collections in CM07 queries.

Image
In System Center 2012 Configuration Manager you can create “Exclude Collection” rules. This can be useful if you have a query based collection but want to exclude members of another collection. Example: You have a collection (A) containing all computers with an application installed, then you need to create a new collection (B) containing all computers where the application is missing. To achieve this you can create a dynamic rule listing all computers in your environment and a second “Exclude Collection” rule excluding all members of the collection (A). As a result collection (B) will only contain clients where the application is missing. If you for some reason still are using System Center Configuration Manager 2007 (and for some reason cannot migrate to CM2012), you can achieve the same by modifying your query. Add the following to your Query (marked in red), J0100249 is the “Collection id”: Select SMS_R_System.Name from  SMS_R_System where SMS_R_System.ResourceId not...

Collection of computers that don't have software X installed

Code : select SMS_R_System.ResourceID,SMS_R_System.ResourceType,SMS_R_System.Name,SMS_R_System.SMSUniqueIdentifier,SMS_R_System.ResourceDomainORWorkgroup,SMS_R_System.Client from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Adobe Reader 8%") Documentation Sometimes you want to create a collection that will find all the computers that don't have a particular software installed and push it to it. This is a good dynamic way to create a collection instead of direct computer addition. Assuming ...

SCCM Collection with IE9 Installed Clients

Identify Windows 7 clients that already have IE9.x installed. Query:-  select * from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceID inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceID where SMS_G_System_SoftwareFile.FilePath like "%\\Program Files\\Internet Explorer\\" and SMS_G_System_SoftwareFile.FileName like "iexplore.exe" and SMS_G_System_SoftwareFile.FileVersion like "9.%" and SMS_G_System_OPERATING_SYSTEM.Version like "6.1%