WSUS Server Cleaneup Wizard - Error: Unexpected Error

san.khurtsilava 11 Reputation points
2022-07-08T10:17:25.823+00:00

![218919-screenshot-12.png][1]

When I go to run the WSUS Server Cleanup wizard, I keep getting Unexpected Error

"The WSUS administration console has encountered an unexpected error. This may be a transient error; try restarting the administration console. If this error persists,

Try removing the persisted preferences for the console by deleting the wsus file under %appdata%\Microsoft\MMC.

System.ComponentModel.Win32Exception -- Access is denied

Source
System.Windows.Forms

Stack Trace:
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at Microsoft.UpdateServices.UI.SnapIn.Wizards.ServerCleanup.ServerCleanupWizard.OnCleanupComplete(Object sender, PerformCleanupCompletedEventArgs e)"

can anyone help me?

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,126 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Rita Hu -MSFT 9,626 Reputation points
    2022-07-11T01:24:53.9+00:00

    @san.khurtsilava
    Thanks for your posting on Q&A.

    Have you tried the tip to delete the wsus file under %appdata%\Microsoft\MMC and check whether it is helpful?
    I would like sharing the screenshot in my lab below. Note that the path depend on the logon local user. According to my screenshot, the logon user is Administrator:
    219267-13.png

    Please try to delete and reopen the WSUS console.

    In the past, a lot of users feedback the issue occurred when they run the Server Cleanup Wizard. Also I would like to share the PowerShell script to cleanup the database. Here are several useful links for you:
    https://learn.microsoft.com/en-us/powershell/module/updateservices/invoke-wsusservercleanup?view=windowsserver2022-ps
    https://learn.microsoft.com/en-us/troubleshoot/mem/configmgr/wsus-maintenance-guide

    Also we could review the Event Viewer to get more error information.
    Here is a reference screenshot for you:
    219323-14.png

    Hope the above will be helpful.

    Best regards,
    Rita


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. san.khurtsilava 11 Reputation points
    2022-08-17T13:53:28+00:00

    Hello @Rita Hu -MSFT in my case, this solution does not work

    1 person found this answer helpful.

  3. Gilton K. Jose 5 Reputation points
    2023-11-24T19:08:16.8066667+00:00

    Try deleting %appdata%\Microsoft\MMC\wsus and connect to the server again.

    1 person found this answer helpful.
    0 comments No comments