locked
Timeout during CleanupUnneededContentFiles RRS feed

  • Question

  • Hi,

    I try many times the PowerShell command "Invoke-WsusServerCleanup -CleanupUnneededContentFiles" but it stop after some minutes

    Invoke-WsusServerCleanup : The operation has timed out
    In Line:1 car:1
    + Invoke-WsusServerCleanup -CleanupUnneededContentFiles
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (Microsoft.Updat...rCleanupCommand:InvokeWsusServerCleanupCommand) [I
       WsusServerCleanup], WebException
        + FullyQualifiedErrorId : ServerIsInvalid,Microsoft.UpdateServices.Commands.InvokeWsusServerCleanupCommand

    Any ideas?

    Regards

    Thursday, May 2, 2019 12:42 PM

Answers

All replies

  • Hi Sialaser,
      

    Thank you for posting here.
    If this is a recurring issue, I suggest you try the following steps to fix it:
      

    1. Reduce The Number Of Approved Updates
      Please refer to the following article to reject updates that are no longer needed or have been replaced: "How to identify and decline superseded updates in WSUS".
    2. Server Cleanup Wizard
      In WSUS console, expand OPTIONS then click SERVER CLEANUP WIZARD and let it clean up all the junk.
    3. Retry Your Script.
      Another article mentioned a similar problem because the number of processing updates was too large and it was recommended to re-execute the script.
       
      * Please Note: Since the web site is not hosted by Microsoft, these links may change without notice. Microsoft does not guarantee the accuracy of this information.
       

    Reply back with the results would be happy to help.
     

    Regards,
    Yic

    Please remember to mark as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, May 3, 2019 3:22 AM
  • This is due to not regularly performing the proper WSUS maintenance including but not limited to running the Server Cleanup Wizard (SCW), declining superseded updates, running the SQL Indexing script, etc.

    Part 8 of my 8 part blog series on How to Setup, Manage, and Maintain WSUS deals with the maintenance that you should be performing on a regular basis, not just ad-hoc.

    https://www.ajtek.ca/wsus/how-to-setup-manage-and-maintain-wsus-part-8-wsus-server-maintenance/


    Adam Marshall, MCSE: Security
    https://www.ajtek.ca
    Microsoft MVP - Windows and Devices for IT

    Saturday, May 4, 2019 4:16 PM
  • You could do a WSUSutil reset

    https://www.ajtek.ca/wsus/what-do-i-do-when-i-run-out-of-space-on-a-wsus-server/

    You could re-install WSUS

    https://www.ajtek.ca/wsus/how-to-remove-wsus-completely-and-reinstall-it/


    Adam Marshall, MCSE: Security
    https://www.ajtek.ca
    Microsoft MVP - Windows and Devices for IT

    • Marked as answer by sialaser Wednesday, May 8, 2019 4:56 AM
    Saturday, May 4, 2019 4:17 PM
  • Hi,
     

    Any update is welcome here.
    If the issue is resolved, share your solution or find the helpful response "Mark as Answer" to help other community members find the answer.
     

    Thank you for your cooperation, as always.
     

    Regards,
    Yic

    Please remember to mark as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, May 8, 2019 1:37 AM