Windows update cleanup

Is there anyone can help me with a SCCM script to clean up expired Windows update?
Edit membership option not working.
Who is Participating?
Jay ShawnConnect With a Mentor Commented:
Hi RedwanAus....
Follow these simple steps to clean up your expired windows updates in only few clicks:
1.      Navigate to the All Software Updates node under Software Library, and search for all expired updates.
2.      Add the value for expired updates to search, leave the default value as “Yes”, and click search.
3.      The search results will include all of your expired updates, so simply select all updates in the list view (CTRL+A), right-click, and choose Edit Membership.
4.      You will then see a list of all Update Groups where any of the selected updates from the list view are members. Simply uncheck the selected check boxes.
5.      Click OK to remove all of the expired updates from the selected Update Groups, and they’ll be ready for deletion through the process outlined in the next step.

For more help please follow this link:

RedwanAusConnect With a Mentor Author Commented:
I have tried this option, but it's not removing all expired updates. There are some updates more than few months old. Please see the attachment.
RedwanAusAuthor Commented:
Wasn't much helpful.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.