How To Enable SCCM Implicit Uninstall of Applications

Prajwal Desai
Posted by Prajwal Desai
Enable Implicit Uninstall of Applications in ConfigMgr

In this useful post, I will show you how to enable implicit uninstall of application in SCCM. You can now enable SCCM implicit uninstall of applications for device collections and user collections.

First, let’s understand what exactly is implicit uninstall of application mean, and how to use this new feature during application deployment in SCCM.

What exactly does “Implicit Uninstall of Applications” in SCCM mean. With the implicit uninstall feature, a device installs the applications if it’s a part of a SCCM device collection or user collection and when you remove the device from the collection, the application uninstalls.

One of the most used feature of Configuration Manager is application deployment. From the ConfigMgr console, you can easily deploy applications to any device collection.

Ad imageAd image

Organizations have numerous collections because for every application that you deploy, you need at least two collections – one for install and another for uninstall.

If you have many applications, this practice adds overhead of managing more collections, and can reduce site performance for collection evaluation. The solution to this issue is Implicit application uninstall feature introduced as a new feature in SCCM 2107 and also extended in SCCM 2111 release.

The Implicit Uninstall of Applications is a new feature introduced in SCCM 2107 release. So as a prerequisite, you must be running ConfigMgr 2107 and above to enable an application deployment to support implicit uninstall.

Starting in Configuration Manager version 2107, you can enable an application deployment to support implicit uninstall.

The implicit uninstall option is available for user collection, device collection and application groups during the SCCM application deployment. The deployment purpose must be Required to use the implicit application uninstall feature. You must enable Uninstall this application if the targeted object falls out of the collection option to use implicit uninstall of applications.

Note: You must be careful with enabling the implicit uninstall option on deployments to large query-based collections. Especially queries to external sources like Active Directory groups. An unexpected external change could automatically trigger numerous devices to uninstall the application.

Let’s look at the steps to enable the implicit uninstall of applications in SCCM.

Enable SCCM Implicit Uninstall of Applications

In SCCM, you can enable implicit uninstall of applications using the following steps:

  • First launch the SCCM console.
  • Navigate to Software Library\Overview\Application Management\Applications.
  • Right-click an application, click Deploy and choose a target device collection.
  • On the Deployment Settings window, select the Purpose as Required.
  • For SCCM implicit uninstall of application, enable the option When a resource is no longer a member of the collection, uninstall the application.
Enable SCCM Implicit Uninstall of Applications
Enable SCCM Implicit Uninstall of Applications

You may choose to schedule the application deployment on Scheduling page. On the User Experience page, specify the appropriate settings for user notifications. Click Next.

Enable Implicit Uninstall of Applications in ConfigMgr
Enable SCCM Implicit Uninstall of Applications

Review the settings on Summary page and on Completion window, click Close.

Enable Implicit Uninstall of Applications in ConfigMgr
Enable SCCM Implicit Uninstall of Applications

Monitor SCCM Implicit Uninstall of Application

Let’s monitor SCCM Implicit Uninstall of the application now. The application is deployed as required to the target device collection. The devices that are part of the device collection will have the application installed. But wait, we are yet to test the implicit uninstall application feature.

One quick check that I am doing here is checking the application deployment status. As per the below screenshot, I see the application is installed on both the devices that are part of device collection.

Application Deployment Status
Monitor Application Deployment Status

To test the implicit uninstall of application feature in SCCM, I will be removing a device manually from the device collection. If I do that, the application should uninstall automatically.

After a few minutes, the application was uninstalled from the target computer. We can conclude that the implicit uninstall of the application worked flawlessly. You can verify the implicit uninstall of the application by opening the AppEnforce.log file on the client computer.

+++ Starting Uninstall enforcement for App DT "7-Zip 19.00 (x64 edition) - Windows Installer (*.msi file)
Performing detection of app deployment type 7-Zip 19.00 (x64 edition) - Windows Installer (*.msi file)
+++ Discovered MSI application [AppDT Id: ScopeId_187120FE-9A9C-46D3-9808-A9944585A41E/DeploymentType_6cf3a77b-51e4-448a-946a-28b3714784af, Revision: 1, MSI Product code: {23170F69-40C1-2702-1900-000001000000}, MSI Product version: ]
App enforcement environment: 
Context: Machine
Command line: msiexec /x {23170F69-40C1-2702-1900-000001000000} /q
Allow user interaction: No
UI mode: 1
User token: null
Session Id: 4294967295
Content path: C:\Windows\ccmcache\1
Working directory: 	AppEnforce
Prepared working directory: C:\Windows\ccmcache\1
Found executable file msiexec with complete path C:\Windows\system32\msiexec.exe
Prepared command line: "C:\Windows\system32\msiexec.exe" /x {23170F69-40C1-2702-1900-000001000000} /q /qn
    Executing Command line: "C:\Windows\system32\msiexec.exe" /x {23170F69-40C1-2702-1900-000001000000} /q /qn with system context)
    Working directory C:\Windows\ccmcache\1
    Post install behavior is BasedOnExitCode
    Waiting for process 6340 to finish.  Timeout = 120 minutes.
    Process 6340 terminated with exitcode: 0
    Looking for exit code 0 in exit codes table...
    Matched exit code 0 to a Success entry in exit codes table.
    Performing detection of app deployment type 7-Zip 19.00 (x64 edition) - Windows Installer (*.msi file)
++++++ App enforcement completed (1 seconds) for App DT "7-Zip 19.00 (x64 edition) - Windows Installer (*.msi file)" [ScopeId_187120FE-9A9C-46D3-9808-A9944585A41E/DeploymentType_6cf3a77b-51e4-448a-946a-28b3714784af], Revision: 1, User SID: ]
Uninstall this application if the targeted object falls out of the collection
Uninstall this application if the targeted object falls out of the collection

Implicit Uninstall for User Collections

Starting in Configuration Manager 2111, the implicit uninstall for user collections is also supported. This means if a user is in a collection, the application installs. Then, when you remove the user from the collection, the application uninstalls.

Let’s test the implicit uninstall feature for user collections in SCCM. This new feature is fully supported by Configuration Manager 2111 and later.

Launch the SCCM console. Navigate to Software Library\Overview\Application Management\Applications. Right-click an Application, select Deploy.

Enable Implicit Uninstall for User Collections
Enable Implicit Uninstall for User Collections

When you deploy an application to user collection, on the General window, click Browse and select the User Collection. Click Next.

Enable Implicit Uninstall for User Collections
Enable Implicit Uninstall for User Collections

The implicit uninstall option for user collections appears on deployment settings window of deploy software wizard.

Note: The deployment purpose must be set to Required to use the implicit application uninstall feature for user collections.

On the Deployment Settings window, select the deployment purpose as Required. Now select the option When a resource is no longer a member of the collection, uninstall this application. Selecting this option will automatically uninstall the application once the user is removed from the collection.

Enable Implicit Uninstall for User Collections
Enable Implicit Uninstall for User Collections

What is Implicit Uninstall for Application Deployment in SCCM?

With the implicit uninstall option for application deployment, a device installs the applications if it’s a part of a SCCM device collection or user collection and when you remove the device from the collection, the application uninstalls.

Is Implicit Uninstall for application deployment supported for Device Collection?

Yes, the Implicit Uninstall feature for application deployment is supported for device collections.

Is Implicit Uninstall for application deployment supported for User Collection?

Yes, the Implicit Uninstall feature for application deployment is supported for user collections.

Share This Article
Prajwal Desai
Posted by Prajwal Desai
Follow:
Prajwal Desai is a Microsoft MVP in Intune and SCCM. He writes articles on SCCM, Intune, Windows 365, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.