Bulk App Uninstall
MSSQL
Grabbing Uninstall GUIDs
We first need to gather the uninstall strings for the application we want to install so we can utilize them to create our SCCM package.
- Open Microsoft SQL Management Studio and connect to your SCCM Database Server.
- Expand your server, expand databases, right click your SCCM database and select “New Query”
- In the new query window that appears run the query below, replacing Symantec Endpoint with the application of your choosing.
|
|
You should get results that look something like this:
Powershell Application Deployment Toolkit
- Now we are going to utilize the Powershell Application Deployment Toolkit to build our package.
- Head on over to their Github to download it now.
- Extract the zip file to your SCCM content location and edit the Deploy-Application.ps1 file with your favorite editor e.g. \\sccm\packages\Supplemental\Symantec\SEPUninstall
Starting around line 60 we have the Variable Declaration be sure to set: appVendor, appName, and appAuthor
|
|
Around line 169 edit the uninstallation settings like below. Replacing Symantec Endpoint Protection with the application you’re trying to uninstall.
Here I’ve configured a custom parameter /QN SYMREBOOT=ReallySuppress I’ve also added the Uninstall for LiveUpdate as well.
|
|
Creating the Application
General Information
- Open Configuration Manager Console, go to Software Library > Application Management > Applications
- Right click the folder where you want to create your application and select “Create Application”
- Select “Manually specify the application information”
- Enter Application info making sure to include at least Name and Software Version
Software Center
On the next page, select a language and enter the Localized application name.
Here I’ve also included my own custom icon:
Deployment
On the Deployment Types screen click Add..
For the Type select Script Installer and Manually specify the deployment type information
General Information
On the next screen, enter a name again:
Content
- Content Location: The UNC path to your Powershell Application Deployment Toolkit files.
- Installation Program: “Deploy-Application.exe” -DeploymentType “Uninstall”
- Since we are performing an uninstall we use the same DeploymentType for Install and Uninstall.
- Uninstall Program: “Deploy-Application.exe” -DeploymentType “Uninstall”
Detection Method
- Click Add Clause…, change the Setting Type to Windows Installer
- In the Product code box enter your first GUID and hit OK.
- Repeat this process for each one of your GUIDs.
User Experience
These settings can be changed to suit your environment but for most setups you’ll want to change these settings:
- Installation behavior: Install for system
- Logon requirement: Whether or not a user is logged on
Completing the Wizard
Go ahead and hit Next twice to skip the Requirements and Dependencies screen. They aren’t needed for most deployments.
Finally click Close which should bring you back to the Create Application Wizard screen. To complete the Wizard, click Next two more times and then **Close.
Deploying the Application
Right click your newly created application which should now be showing in the folder you selected and click Deploy
Content
Select the distribution points or distribution point groups where you would like the software deployed. This will be specific to your setup so I can’t offer direct guidance here.
Deployment Settings
Since we are Uninstalling rather than Installing it’s important we set the Action here to Uninstall
Scheduling
This is pretty self explanatory you can either set it to be available As soon as possible after the available time or schedule it for a later date/time.
User Experience
These options are entirely up to you. My organization uses maintenance windows so I’ve opted to hide notifications to the user and not allow _un_installation outside of our maintenance windows.
Alerts, Summary, and Completion
Nothing to do here but hit Next until you’ve completed the wizard. If everything went correctly you can speed up a computer’s retrieval of the policy by going to Start > Control Panel > Configuration Manager > Actions tab, select Machine Policy Retrieval & Evaluation Cycle and click Run Now