QUERY FOR ALL XP COMPUTERS WITHOUT .NET FRAMEWORK 3.51 SP1

 

I recently needed a query for all Xp computers that do not have .Net Framework 3.51 SP1 installed.

 

1.  Created a query that gives me all computers that have .Net FrameWork 3.51 SP1 installed.

In the SCCM console, expand the console to Queries.  Create a new query here.

I called mine "All Computers with .Net FrameWork 3.5 SP1"

select distinct SMS_R_System.Name from  SMS_R_System 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 = "Microsoft .NET Framework 3.5 SP1"

 

2.  I then created a query that uses a SubSelected value criterion Type.  Using the computer System -Name Where Operator is not in Subselect.

 

It looks like this.

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 inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_R_System.Name from  SMS_R_System 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 = "Microsoft .NET Framework 3.5 SP1") and SMS_G_System_OPERATING_SYSTEM.Version = "5.1.2600"

 

Reference

 http://scug.dk/blogs/configurationmanager/archive/2009/09/21/subselected-query-to-find-computers-without-net-framework-3-5-sp1-installed.aspx