Welcome to the Blogcast Repository Sign in | Join | Help
Search BlogCastRepository.com for:
in Search

260 BlogCasts in The BlogCast Repository!

SMS 2003 Collection for Systems that DO NOT have a Specific Application Installed

Last post 11-21-2006 3:44 PM by andre. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-20-2006 1:35 PM

    SMS 2003 Collection for Systems that DO NOT have a Specific Application Installed

    I have used this several times, but much of the information I see on the Internet is incorrect or has some sort of typo in the syntax. Bellow is a query you can use for a collection for all systems that do not have Microsoft SQL Server 2005 installed. You can change the display name to any application to change the results.

    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 ResourceId not in (SELECT 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 'Microsoft SQL Server 2005' )

     

    Here is one that should work for 2 applications. Sim[ply change the 2 display names in bold. To add a third or more, copy everything from what's in red and below to the end of the query and change the display name again.

     

    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 ResourceId not in (SELECT 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 'Microsoft SQL Server 2005' ) or ResourceId not in (SELECT 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 'Security Update for Windows Server 2003 (KB890046)' )

    Brian S. Tucker
    The Blogcast Repository - MCSE, MCDBA, MCT & MCTS
    • Post Points: 20
  • 11-21-2006 3:44 PM In reply to

    • andre
    • Top 75 Contributor
    • Joined on 11-21-2006
    • Posts 12
    • Points 180

    Re: SMS 2003 Collection for Systems that DO NOT have a Specific Application Installed

    tested it partially and it seems to work fine
    • Post Points: 5
Page 1 of 1 (2 items)