Recreating the SUSDB and WSUS Content folder for a Windows Server 2012 based computer

1. Open PowerShell as admin.

2. Stop the WSUS service and IIS Service with the following command:

stop-service WSUSService, W3SVC

Verify that both are stopped by running get-service WSUSService, W3SVC

It should look something like this:

3. Open SQL Server Management Studio and connect to the instance for SUSDB.

How you connect via SQL Server Management Studio is different depending on whether you installed SUSDB on Windows Internal Database (WID) or SQL Server. This was specified when you installed SUSDB. If you are not sure which you used, you can check a registry key on the WSUS server located atHKLM\Software\Microsoft\Update Services\Server\Setup to verify.

5. Open SQL –> expand databases-> right-click SUSDB –> Delete. Be sure that you select “Close existing connections” at the bottom of the wizard.

Optionally, you can also delete the backups (delete is the default).

6. Delete or rename the content directory, then recreate it. Please note that this will not delete/rename if the two services mentioned above are still running.

You can find the directory directory for the content folder by looking in HKLM\Software\Microsoft\Update Services\Server\Setup \ContentDIr *

Rename the directory by running REN WSUS WSUS_old , or delete it by running DEL WSUS then confirm All with “A”:

Recreate the directory by running MKDIR WSUS Note that the default permissions will be reapplied when you run the post install.

If you are not removing the SUSDB, but are removing the content and need to re-download files for updates you have already approved, do the following to initiate the download:

a. CD “C:\Program Files\Update Services\Tools”

b. Run .\WsusUtil.exe reset

7. Start the services:

Start-service WSUSService, W3SVC

Verify that both are started by running get-service WSUSService, W3SVC

8. Reinstall the SUSDB by running the post install. The command varies depending on if you run WIDs or not.

First, CD to Program Files\Update Services\Tools.

For Full SQL (or non WIDS), run the following:

.\Wsusutil.exe postinstall SQL_INSTANCE_NAME=”Server\Instance” CONTENT_DIR=”<drive>:\WSUS”

After doing this, when you first launch the WSUS console, it will bring up the WSUS Configuration Wizard. You can run through this wizard if you would like and select your options such as products, upstream server and proxy.

https://techcommunity.microsoft.com/t5/Configuration-Manager-Archive/Recreating-the-SUSDB-and-WSUS-Content-folder-for-a-Windows/ba-p/274122