/build/static/layout/Breadcrumb_cap_w.png

Collection - Exclude machine

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. 


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: SMal.tmcc 11 years ago
Red Belt
1

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

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ