Hello,

I'm trying to create a collection of all machines that have firefox installed on them but exclude a few machines from the collection. This is the script that I got so far.

SELECTSMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client 

FROMSMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId 

WHERESMS_G_System_INSTALLED_SOFTWARE.ProductName LIKE "%Firefox%" and 

SMS_R_System.Name not like "Machine1" and 

SMS_R_System.Name not like "Machine2" and 

SMS_R_System.Name not like "Machine3" and 

SMS_R_System.Name not like "Machine4" and 

SMS_R_System.Name not like "Machine5" and 

SMS_R_System.Name not like "Machine6" 

 

 

I run this script and it shows me all the machines that have Firefox installed but it includes the machines I wanted to exclude as well. 

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

put or in between the machine names, your rule says it cannot be like all 6 of the names.

Answered 07/12/2013 by: SMal.tmcc
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share