To regulary cleanup your WSUS database:

  1. Download and extract Invoke-WSUSCleanUPTASK.zip
  2. Set the correct values for variables
  3. Configure the Scheduled Task
  4. Check the WSUS_CleanUpReport.html report