How to Reinstall/Install WSUS

3thixs, How-To
Back

Instructions

  1. Open Server Manager either on the host, or remotely and connect to the host you’d like to install on.

  2. Open Remove Roles and Features wizard.

  3. Click Next, and select the Server, and click Next again.

  4. On the Remove server roles screen, under Roles, we want to de-select the following: Web Server (IIS) and Windows Server Update Services.

  5. Click Next

  6. On the Remove features screen, under Features, we want to de-select the following: Windows Internal Database and Windows Process Activation Service.

  7. Click Next and follow the wizard to completion and remove the roles and features.

  8. Restart the Server.

  9. Open an administrative command prompt on the server, and run the command powershell or open powershell directly.

  10. Run the following command in powershell to remove any bits and pieces:

    Remove-WindowsFeature -Name UpdateServices,UpdateServices-DB,UpdateServices-RSAT,UpdateServices-API

  11. Restart the Server.

  12. We now must delete the WSUS folders and files. Delete the following folders:

    C:\WSUS C:\Program Files\Update Services

    Note: You may have stored the WSUS content directory somewhere else, please delete this as well.

  13. We now must delete the IIS folders and files (and configuration, including the WsusPool application pool, bindings, etc.). Delete the following folders:

    C:\inetpub C:\Windows\System32\inetsrv

    Note: You may have issues deleting the “inetsrv” directory. If this occurs, simply rename it to “inetsrv.bad”.

  14. We now must delete the WID (Windows Internal Database) folders and files (including the WSUS SQL Express database). Delete the following folder:

    C:\Windows\WID

  15. While we removed the IIS folders and files, we deleted a needed system file. Run the following command to restore the file:

    sfc /scannow

  16. Restart the Server.

WSUS, IIS, and WID have at this point been completely removed. We will now proceed to install, apply a memory fix, and configure WSUS.

  1. Open “powershell” (by typing powershell) and Install the WSUS Role with the following command:

    Install-WindowsFeature UpdateServices -Restart

  2. To install the WSUS MMC Snap-In/GUI, run the following command in the powershell window:

    Install-WindowsFeature UpdateServices-RSAT, UpdateServices-UI

  3. Run the post installation task command to configure WSUS:

    "C:\Program Files\Update Services\Tools\wsusutil.exe" postinstall CONTENT_DIR=C:\WSUS

AT THIS POINT DO NOT CONTINUE CONFIGURING WSUS AS YOU MUST APPLY A MEMORY FIX TO IIS.

You will see an error message when attempting to use the WSUS MMC. This issue occurs because the WSUS application pool in IIS “WsusPool” has reached its maximum private memory limit and attempts to recycle the memory usage. Ultimately I believe this causes the IIS worker process to crash since it has run out of memory, and the pending command (whether it’s a synchronization or something else) fails to complete. Previously, I noticed database corruption on a WSUS SQL Express database when this issue occurred, so I recommend applying the fix on a fresh install of WSUS.

Fix: IIS Memory Fix. On Wsus server > Start Menu > Windows Administrative Tools > IIS Manager > Expand 'HQWSUS01' > Click on Application Pools > Right Click 'WsusPool' > Advanced Settings > Change Private Memory Limit (KB) to '0' or '4294967295' (which allows max memory)

  1. Restart the Server.
  2. Open the WSUS MMC on the server or remotely from a workstation on the network and connect it to the WSUS instance on your Server Core install.
  3. Run through the wizard as you would normally and perform an synchronization.
  4. WSUS has been re-installed.

And that’s it. You’ve completely reinstalled WSUS from scratch on your Windows Server.

© 3thixs