User collections and AD for automatic application install and uninstall (SCCM 2012 R2)

I want to use user collections to install and uninstall software when a user is put into/taken out of an active directory group.

I figured I can use 2 deployments install and uninstall and I have managed to get an application to install automatically with the following membership rule query applied to an install user collection when a user is added to an AD group (Audacity):

select
SMS_R_USERGROUP.ResourceID,SMS_R_USERGROUP.ResourceType,SMS_R_USERGROUP.Name,SMS_R_USERGROUP.UniqueUsergroupName,SMS_R_USERGROUP.WindowsNTDomain
from SMS_R_UserGroup where SMS_R_UserGroup.UsergroupName = "Audacity"

What I would like to do now is uninstall the application automatically when a user is removed from the AD group, so I've created an uninstall user collection, but I cannot for the life of me figure out what query(s) to use as a membership rule.

Can anyone help out? Or, is there a different/better way to accomplish this task? I have seen this done with device collections but I want to use user collections.


July 29th, 2015 5:00pm

I've done this with a collection that includes all the users and excludes the installation collection. This way all the other users than the ones that are in the correct AD group will get uninstall deployed at them. No query needed.

I have no idea how this could be done so that the uninstall collection only includes the ones that were members of the install collection at some point. Don't think that's even possible without some serious customization.

Free Windows Admin Tool Kit Click here and download it now
July 29th, 2015 11:55pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics