Deployment, SCCM2012, SCCM2012RTM, SUP

Clean Superseeded and expired Software Updates with PowerShell ( SUP )

If you want more information WHY to clean expired and superseded updates you can get more information here from Kent Agerlund.

Also thank Nickolaj Andersen who made the script that does all the work!

Download the file here.

First step is to download the files and copy them to a folder of your choice. In the example, I am using C:\Temp

Open the file getAllSoftWareUpdates.ps1 with Powershell ISE as an administrator.

When the file is open you have to change three values , the first value we have to change is the SiteCode , so change the marked SiteCode S01 ( se the picture ) to the SiteCode you are using where you want to clean updates.
The second value we have to change is the “Client” value, this value represents the name of the software update group or groups that you want to clean, for example. If you have 10 “Client” groups and you want to clean all of those, you enter “Client” and if you have five different “Server” groups you change the value to “Servers”. This script will always take every group with the name you enter in the script.


The third and last value we are going to change is the “SiteServer” name ( se picture ) this can be any server with a provider installed ( I usually run this script on the primary site server then you know it will work , if you are not sure how many providers you have on your site ). After you have change the value go ahead and try to run the script.


If everything works it should look something like this  really nice that you can follow the progress in the console.


Package Manager for Windows 10 and Windows 8.1

This is a really cool new feature of the new Management framework that comes with Windows 10 and is also available for Windows 8.1 , package manager Linux style for Windows! 🙂 check it out here.

Also, if you want to try Chocolatey more info here.