Damien Posted December 16, 2014 Report post Posted December 16, 2014 Guys, these are the queries I currently used to deploy software for device based deployments with AD security groups and SCCM 2012 collections. Install 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.SystemGroupName = "<DOMAIN>\\<Security Group>" Uninstall 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 inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_R_System.NetbiosName not in (Select SMS_R_System.NetBiosName from SMS_R_System where SMS_R_System.SystemGroupName = "<Domain>\\<Security Group>") and SMS_R_System.Client = 1 and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "<NAME OF APPLICATION>" Could someone [please help me to do the same for user based deployments (what queries to use for install and uninstall.)? Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted December 16, 2014 Report post Posted December 16, 2014 I would use a direct membership for the security group that you are using for both users and computers. Uninstalling for users collection is harder as it means that the SW might flip flop, Why would you want to do this? BTW You uninstall query will only find x86 software. it is not best practice to use NetBIOS name in the subselect, instead use resourceid. Quote Share this post Link to post Share on other sites More sharing options...