Invoke-WsusServerCleanup not finishing

tturner226 1 Reputation point
2023-01-27T14:48:00.6833333+00:00

We ran into an issue where our update server would not successfully run cleanup for the "Unused updates and update revisions" and "Unneeded update files" options when running the WSUS Server Cleanup Wizard. It kept giving the standard Reset Server Node error, so I decided to use the PowerShell cmdlet Invoke-WsusServerCleanup to run these two options. From what I understand, when the cmdlet completes it should display the Diskspace Freed and Updates Compressed (if -CompressUpdates is used) and then return to the PS prompt. However, the cmdlet has now been running for almost 4 days and is still sitting at a flashing cursor as if I had just hit Enter after typing the command. The command I used is below. Is there any way to determine whether it's still running or if it's errored out and just not displayed an error in the PowerShell console?

Invoke-WsusServerCleanup -CleanupUnneededContentFiles -CompressUpdates

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,299 questions
0 comments No comments
{count} votes