Beginning with SCCM 2107, you can enable a new option in your application deployments to remove the application as soon as the device is removed from a collection. This new option can be set at the deployment level of any device required deployment. The new option is named SCCM Implicit uninstall. This blog post will list the requirements and will describe how to enable the Implicit uninstall feature.
We’ve seen tons of organizations use 2 differents collections to install and uninstall applications. Some companies have hundreds of applications resulting in twice as many collections. As you may know, collections are one of the most resource-intensive objects in SCCM so reducing their numbers and refresh rate can increase your server performance. That’s why we always recommend good collections maintenance on any SCCM infrastructure.
SCCM Implicit uninstall Requirement
There’s a couple of requirements that need to be done to use Implicit uninstall correctly :
- You need to upgrade your server to SCCM 2107 or later
- You can only target devices collections. User collection installation is not supported.
- You can only enable this option on deployment that are Required. Available installation is not supported.
- Your deployment type need to have the uninstall command in the program tab, this makes sense as this is the command that will be used when removing the device from the collection.
- This feature is for applications only. It cannot be used for Programs, Task Sequences
As long as these requirements are understood, we can go ahead and test our first SCCM implicit uninstall.
Enable SCCM Implicit Uninstall
For our example, we’ll be using a simple application: 7-Zip. We’ll deploy the application on a test computer, enable Implicit Uninstall and we’ll be removing it from the collection and see what happens. :
- In the SCCM Console
- Go to to Software Library / Application Management / Applications
- Right-click your application (in our cae 7-Zip) , click Deploy and choose your device collection
- On the Deployment Settings window, select action : Install and Purpose as Required
- To enable SCCM implicit uninstall, enable the option Uninstall this application if the targeted object falls out of the collection
- Complete the wizard and complete the deployment creation
- On the site server, a new log is monitoring all changes related to the SCCM implicit uninstall : SMS_ImplicitUninstall.log
Monitor the Application Uninstall
So from now, a new deployment has been created for 7-Zip on our device. If the application is already installed, nothing happens, if the application is not installed, it will be installed… nothing new there. What we want to test, is the removal of the application if it gets removed from the collections.
On our test computer the application is installed :
- In the SCCM Console, in the Monitoring section, our deployement shows Success (since it’s already installed)
- Now, let’s remove it from the collection and see what happen
- Open the collection we just created the deployment, select the device, right-click on it and select Remove from Collection. If it’s a dynamic query collection modify your query to exclude the device.
- 15 minutes after the next computer policy retreval, the application should be removed. By default, it’s 60 minutes, let’s force it manually on our test computer and see what happens.
- As soon as we trigger the machine policy, the status changed to Past Due – will be removed. Looking good, as stated in the Microsoft Documentation, it should be removed in the next 15 minutes.
- As any other application installation/uninstallation we are monitoring the process in AppEnforce.log
The application gets uninstalled as intended, 15 minutes after the policy gets received.
Implicit uninstall of applications using Powershell
At the time of this writing, the New-CMApplicationDeployment PowerShell command is not supporting the new implicit uninstall command. Maybe in the future, it will be supported but for now, it’s a manual process only.
Founder of System Center Dudes. Based in Montreal, Canada, Senior Microsoft SCCM Consultant, 5 times Enterprise Mobility MVP. Working in the industry since 1999. His specialization is designing, deploying and configuring SCCM, mass deployment of Windows operating systems, Office 365 and Intunes deployments.