Respondida .Net Framework 3 Query on 2008 servers

  • Monday, July 09, 2012 11:00 AM
     
     

    We are currently in the progress of getting our environment ready for service center 2012 and one of the things we want to do is install .net 3 and 4 on all servers.

    4.0 is easy because I can query add/remove but for .net 3 this is a problem since 2008 servers have this as a feature installed.

    Currently I am using this query for 3.5 and 4.0 not installed:

    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 where SMS_R_System.ResourceId in (select distinct SMS_R_System.ResourceId 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 like "%.net Framework 3.5 SP1%") and SMS_R_System.ResourceId in (select distinct SMS_R_System.ResourceId from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS_64 on SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like "%.net Framework 3.5 SP1%") and SMS_R_System.Active = 1

    I cant figure out how I can get this query to work so that it excludes servers that have the .net 3 feature installed.

All Replies

  • Monday, July 09, 2012 12:17 PM
     
     

    I have two options for you.

    1) http://myitforum.com/cs2/blogs/skissinger/archive/2008/09/27/win32-servercomponent-what-is-it.aspx  To put win32_serverfeature in your sms_def.mof so that you can create collection queries on installed features.

    or

    2) http://myitforum.com/cs2/blogs/skissinger/archive/2011/05/25/hardware-inventory-mof-edit-for-net-frameworks-updated-with-v1.aspx .  To put the inventory edits in sms_def.mof/configuration.mof so that you have information regarding installed .net versions and can create collection queries around installed versions of .net.


    Standardize. Simplify. Automate.

  • Monday, July 09, 2012 12:42 PM
     
     

    I can query for the information, the problem is getting it in a query so that it shows machines that do not have 3.5 installed.

    The above query will work fine but it will also show 2008 servers that have the .net feature installed.


    • Edited by Verderf Monday, July 09, 2012 12:43 PM
    •  
  • Monday, July 09, 2012 1:08 PM
     
     Answered

    I guess I do not understand the question then.

    You say you already CAN query for server 2008 that have the .net feature installed.  If that is true, then you need a subselect.

    If you currently cannot do a query for server 2008 that have the .net Feature installed, then please re-look at option #1--the one specifically to get into your database the contents of win32_serverfeature.


    Standardize. Simplify. Automate.

  • Tuesday, July 10, 2012 5:19 PM
     
     Answered

    Hi,

    You can limit the collection to Client PC's using the query what you were using.