Ever since I released the console extension for ConfigMgr to clean up Software Update Groups from expired and/or superseded Software Updates, many have given me lots of feedback and I’m now pleased to announce that I’ve updated the script with a new version. In this new version of the Clean-CMSoftwareUpdateGroups.ps1 script, the total execution time hav been improved enormously. Previously it could take minutes to complete the clean up process, but with the new version it only takes a couple of seconds (at least in my demo environment and at some customers where I’ve tested this). I’ve also added two new options for you to choose how to perform the clean up process, you can read more about that below.
With this updated script, you now have the option to clean your Software Update Groups by the following criteria:
- Expired and Superseded (Remove content)
- Expired and Superseded (Keep content)
- Expired Only (Remove content)
- Expired Only (Keep content)
- Superseded Only (Remove content)
- Superseded Only (Keep content)
Download the console extension
You can download the console extension from the TechNet Gallery.
Installation
Refer to the installation documentation on the following blog post:
https://msendpointmgr.com/2015/03/15/clean-software-update-groups-console-extension-for-configmgr-2012/
Let me know if you have any questions or suggestions.
(10380)
Hello Nickolaj! What a great and amazing job. Congratulation. Does the tool work on 1810? Thanks for this amazing tool.
[…] https://msendpointmgr.com/2015/12/15/updated-clean-software-update-groups-script-for-configmgr/ […]
Hi ,
i want to stop/disable windows services, how can i do that by using SCCM?
TERRIFIC JOB!
Hi
Thank you very much for post this solution !
My question is if to use (Remove Content) option, it will remove the downloaded update files from the software update packages? and also do a refresh of the packages?
Just want to avoid to refresh many packages at same time.
Thank you.
Hi Nickolaj,
Many Thanks for this Great Job !
Can we use this script with command line not with console extension and only for one Software Update Group ?
And can we use correctly the “remove content” with a DFS share folders ?
It was not always correct with previous script (version of November 18, 2014)
Regards
Sonny
Also thanks Nickolaj – this is very useful and should be built into the console (@djammer ;))
But would like to echo the request to run this for an individual software update group!
Hi!
Just ran your script, but it did not seem to remove content from the different SUPs when i ran Expired only nor Superseded only, (both the Remove content version).
It was only when i ran Expired and Superseded (remove content) that the content actually disappeared.
Since there are no log files to peruse, i just caught a glimpse on the verbose that there was nothing to remove in the to first, whereas i could see some verbosity about removing content when running Expired and Superseded.
Any tips or thoughts?
Hi Baard,
It’s by design, because a Software Update can be in the following states:
– Expired and Superseded
IsExpired = True
IsSuperseded = True
– Expired Only
IsExpired = True
IsSuperseded = False
– Superseded Only
IsExpired = False
IsSuperseded = True
So for instance in an environment where you’re not delaying supersedence and expire information, a Software Update would be expired and superseded at the same time. Therefor when running the Expired Only option for instance, it will check if Software Update instance is _ONLY_ expired π
Regards,
Nickolaj
Ah, ok, all is well then, thanks π
Thanks for updating this script. It works GREAT!
Hi Tim,
You’re very welcome!
Regards,
Nickolaj
[…] KΓ€lla: Updated Clean Software Update Groups script for ConfigMgr | System Center ConfigMgr […]
[…] https://msendpointmgr.com/2015/12/15/updated-clean-software-update-groups-script-for-configmgr/ […]
Does it work on ConfigMgr v1511? π
Hi Sandy,
It sure does. I’ve tested it on the following versions:
– ConfigMgr 2012 R2
– ConfigMgr 2012 R2 SP1
– ConfigMgr 1511
Regards,
Nickolaj