Question : SMS collection help.

I have a dynamic query but I want to exclude 2 or 3 computers from this collection how can i acheive this.

Lets use computer1 and computer2.

Thanks,

Answer : SMS collection help.

Hello smartmanwin!

Have you tried this in your query:  Name not like "%computer%" and SMS_R_System.

Example of full query:

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.Name like "%computer0%" and SMS_R_System.Name not like "%computer1%" and SMS_R_System.Name not like "%computer2%" and SMS_R_System.ResourceDomainORWorkgroup = "domain" and SMS_R_System.OperatingSystemNameandVersion like "%server%"

This query basically populates all servers with the naming convention "computer0" and excludes all servers with the naming conventions of "computer1" or "computer2" on the domain "domain."  You would simply replace "computer0", "computer1", "computer2" and "domain" with your organization's information.

Let me know.

/cheers
Random Solutions  
 
programming4us programming4us