Share via


Script / Method to Mass Delete SCCM Applications (Plus Other Things)

Question

Monday, February 26, 2018 8:43 PM

Hey Guys - 

We are in need of cleaning up our SCCM (1710) environment, but first wanted to ask a question.  The majority of the applications I need to clean up (delete) include...

  • Applications with multiple revisions in history
  • Applications where deployment types are used by other apps for dependencies
  • Applications where deployments types within it are dependent upon each other

Obviously, getting everything squared away in order to simply delete it can be tedious and an outright pain.

My question is, does anyone know of a script, method, or whatever else that would assist with cleaning up applications like this?  Surely, PowerShell is capable of detecting and removing anything blocking deletion, but I haven't found a script that does so yet.  If you know of anything, please let me know.  Otherwise, I may invest time in making something if even possible.

Extra Credit: If you know of a script that does something similar for Collections, packages, etc :)

Thanks!

Ben K.

All replies (2)

Tuesday, February 27, 2018 6:53 AM

For revision history you could do something like this:

https://social.technet.microsoft.com/Forums/office/en-US/52b82bcd-2e83-4455-b442-2162ef8c174a/programmatically-remove-all-but-lastest-application-revision-history-instances?forum=configmanagerapps

I haven't seen a script out there that caters for all references. I guess there is also task sequence and configuration item reference.

It would be nice of the product to have this built in.

Richard Knight | Collection Refresh Manager | Twitter


Wednesday, February 28, 2018 2:47 AM

Please also refer to the link below:

SCCM Configmgr 2012 Powershell script How to delete multiple packages applications Driver packages what else ?

http://eskonr.com/2014/07/sccm-configmgr-2012-powershell-script-how-to-delete-multiple-packages-applications-driver-packages-what-else/

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].