PC with app x but exclude PC y

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
    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 “<app name>”
    and SMS_R_System.Name != “<PC name in upper case>”

Leave a Reply

Your email address will not be published. Required fields are marked *