Create a new text document and rename it to “Uninstall MEP.bat“. Right click the batch file and edit with Notepad. Now add the below code to the batch file and save the file. Let me tell you this is a very simple code and works correctly.
After you are ready with the batch file, create a new package in SCCM. Right click Packages and click Create Package.
Specify the name for the package and browse to the folder where the script is located. Click Next.
Choose the program type as Standard Program. Click Next.
Specify the name of the standard program, in the command line text box click Browse and select the batch file and click Next.
No changes to be made here, click Next.
Click on Close.
You need to distribute the content to the DP. Right click on the package and click Distribute Content. Proceed to the below steps only when the package is available with DP.
Right click on the package and click Deploy. Choose the Collection that you want to deploy. Click Next.
Set the Purpose as Available. Click Next.
No changes to made here, click Next and complete the wizard.
After few minutes, on the client computer the package is available. Select the package and click on Install.
On the client computer open the execmgr.log file for troubleshooting purpose. We see that the script has been executed and the SCEP client has been uninstalled successfully from the computer.