Software Deployment Question
SCCM question regarding application un install
Please could someone explain how applications get un installed from users machine in an enterprise environment when the application is no longer required by the user.
For Example using SCCM 2012 to deploy to application and silent install. Once the user no longer requires this application how can I create or setup an automatic task to ensure the application is silently un installed from their machine?
Is it just a case of deleting their machine from the relevant AD group memberships associated to that application collection? and the un install program will perform automatically?
Does anyone have a real life example that I can view please with the code and parameters?
Answer Chosen by the Author
Yes this can be managed and controlled via AD Groups for SCCM Applications. You require two SCCM collections (install & uninstall), with deployments. Both collections should be query based. Query statements below.
Whenever computers are added to the associated AD Group, it automatically installs the application. If a device has the application installed (manually) and is not included in the AD Group it will be uninstalled. To uninstall from a computer that's included in the AD Group, simply remove the Computer from the AD Group.
Install SCCM Collection Query Statement
SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.SystemGroupName = "<DOMAIN>\\<AD Group>"
Uninstall SCCM Collection Query Statement
SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS as Software on Software.ResourceID = SMS_R_System.ResourceId where Software.DisplayName = "<Name of Application>"
Modify <DOMAIN> with your Domain Name
Modify <AD Group> to your AD Group Name
Modify <Name of Application> to EXACTLY as appears as in Add Remove Programs.
Finally within your SCCM uninstall collection, ensure your exclude the SCCM install collection.
Providing you're collection query is setup correctly, when a computer is added into the AD Group and you've updated the membership of the SCCM install collection, you will see the member count on the collection increase. Likewise with the uninstall collection when a computer is removed from AD Group it will populate the uninstall collection.
It can take a bit of getting your head around initially. But when implemented works a treat.
After posting - noticed post was truncated within both query statements, so have put carriage return after SMS_R_SYSTEM.Name, which should be removed if your copying and pasting.