We help IT Professionals succeed at work.

wsus server out of storage space

Dan
Dan asked
on
I am running WSUS 2012 R2, and my 2TB drive is almost full of the wsus content.  The WSUS folder is at almost 1.5TB and I didn't even select all the options, only that I need for my organization.

Is there a way to delete old updates from my drive via WSUS?  When I go to C:\wsus_database\WsusContent, I see different folders with .cab files, and  it's probably not wise to delete files directly that way, right?

Any suggestions?
Comment
Watch Question

Sean BravenerSenior Information Technology Consultant
CERTIFIED EXPERT
Awarded 2019
Distinguished Expert 2019

Commented:
periodically what you need to do is go in and cleanup the DB of superseeded and expired patches.  here is an automated process to do so.  
https://gallery.technet.microsoft.com/scriptcenter/WSUS-Maintenance-w-logging-d507a15a

this goes in and deletes old patches and removes their content.  unfortunately the new patching model maintains large files so 2 TB is almost not enough if you are maintaining patches for a large environment.
DanNetwork Engineer

Author

Commented:
I tried using the built in server cleanup wizard, but every time I get this error, I even restarted the server, same error.

error
Senior Information Technology Consultant
CERTIFIED EXPERT
Awarded 2019
Distinguished Expert 2019
Commented:
in Server 2012R2, this is an error that happens when you use the WID (Windows Internal Database) and it becomes corrupted.  it usually requires a reinstall of WID but it is an ugly process and you will lose your historical data so is generally bad.  the script I sent uses PS to do the same process so bypasses the corruption.
DanNetwork Engineer

Author

Commented:
I tried to run the script, but it's failing:

error
Sean BravenerSenior Information Technology Consultant
CERTIFIED EXPERT
Awarded 2019
Distinguished Expert 2019

Commented:
forgive the simple questions
are you running from a admin PS session?
are you running from the WSUS server itself?
what version of PS are you running?  is it at least V3?
DanNetwork Engineer

Author

Commented:
1. yes, I ran powersehll as admin, right clicked, and selected run as admin
2. yes, I ran the script from the local wsus server
3. version
DanNetwork Engineer

Author

Commented:
what do I do next?
DanNetwork Engineer

Author

Commented:
I have restarted IIS and then opened the wsus console, still same error.  I have restarted the server, still the same error.
I tried running the script again, and still the same error.  It's this love hate relationship with Microsoft, I like the fact that it has a GUI for the OS, but it has so many bugs, they just can't write code.
DanNetwork Engineer

Author

Commented:
Thanks for your help