To configure your deployment in System Center Configuration Manager (SCCM) so that software is automatically uninstalled when a client device is no longer a member of a collection, you need to adjust specific deployment settings during the deployment setup. Here's how you can achieve this:
-
Create a Required Deployment with Install Action:
- When you create a deployment for your application or package, ensure that the Action is set to "Install".
- Set the Purpose of the deployment to "Required". This ensures that the software is automatically installed on all devices in the targeted collection without user intervention.
-
Configure Deployment Settings to Allow Automatic Uninstallation:
- In the Deployment Settings tab of the deployment wizard or properties, look for the option related to automatic uninstallation.
- Enable the setting "Automatically uninstall this application when it falls out of the collection". This option tells SCCM to monitor the membership of devices in the collection and to automatically uninstall the application from any device that is removed from the collection.
-
Ensure Collection Membership Is Dynamic:
- For this to work effectively, your collection should be based on dynamic membership rules that reflect the criteria for devices that should have the software.
- As devices no longer meet the criteria (and thus are removed from the collection), SCCM will trigger the uninstallation on those devices.
-
Monitor Deployment and Collection Membership:
- Keep an eye on the deployment statuses and collection memberships to ensure devices are being added and removed as expected.
- Use SCCM reports and logs to verify that the software is uninstalling correctly from devices that leave the collection.
Why This Works:
- The "Automatically uninstall this application when it falls out of the collection" setting ties the presence of the software on a device directly to its membership in the collection.
- SCCM continuously evaluates collection memberships and enforces compliance based on deployment settings.
- When a device is no longer a member of the collection, SCCM recognizes this change and initiates the uninstallation process for the application on that device.
Additional Considerations:
- Maintenance Windows: If you have maintenance windows configured, ensure that they allow enough time for uninstallation tasks to run.
- User Experience: Be aware that uninstallation might impact users. Consider notifying users if the uninstallation could disrupt their work.
- Testing: Before rolling this out widely, test the deployment and uninstallation process on a small group to ensure it works as intended.
Example Steps:
- In the SCCM console, go to Software Library > Applications.
- Right-click your application and select Deploy.
- Choose the target collection.
- In the Deployment Settings page:
- Set Action to "Install".
- Set Purpose to "Required".
- Check the box for "Automatically uninstall this application when it falls out of the collection".
- Complete the deployment wizard with your desired scheduling and user experience settings.
By configuring these settings, SCCM will manage the lifecycle of the software on your devices, ensuring that it is installed when devices are in the collection and uninstalled when they are not.
Answer:
Enable the deployment option "Automatically uninstall this application when it falls out of the collection"—set the deployment purpose to Required, and in Deployment Settings, check this box so SCCM uninstalls the software from PCs no longer in the collection