Tuesday, July 8, 2014

Delete multiple Packages in Configuration Manager 2012 SP1

Sometimes it's needed to delete multiple software packages in the ConfigMgr console. By default this isn't possible, when selecting multiple packages this option will be greyed out. In my case it was needed to delete around 50 packages.

By deleting a package you must select multiple clicks also, this because you have:
1) Click Delete
2) Click Next
3) Click No, I know that I want to delete this package
4) Click Next
5) Click Next
6) Click Close

You don't want to do that for over 50 packages, which are 300+ clicks then. Just have a look at a easier way. From within the ConfigMgr console start "Connect via Windows PowerShell".

Then type in the following command:
Remove-CMPackage -Name "Package name" -Force

You can also type Remove-CMPackage and click Enter. Then you can enter as many Package ID's as you want and press enter twice. Then you must press enter for every package that you want to delete.

Way better then 6 clicks for every package if you ask me! ;)

No comments:

Post a Comment