How to reinstall WSUS on Windows 2012 R2

To re-install WSUS with a clean database i.e. no previous configuration, run the following procedure (powershell commands).

Remove all WSUS components

Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database,Iis
– Remove-WindowsFeature -Name UpdateServices,UpdateServices-DB,UpdateServices-RSAT,UpdateServices-API,UpdateServices-UI-IncludeManagementTools
– Delete C:\Windows\WID
– Delete the registry key HKLM\SOFTWARE\Microsoft\Update Services
– Delete the WSUS file from %appdata%\Microsoft\MMC
– Delete folder %ProgramFiles%\Update Services along with all of its subfolders and files.
– Reboot the Server


Install all WSUS components

– Verify IIS is installed and working without errors (check http://localhost on server)
– Install-WindowsFeature -Name Iis
– Install-WindowsFeature Name UpdateServices IncludeManagementTools

– Once WSUS installation has completed, change the current working directory to %programfiles%\Update Services\Tools and run one of the following post-installation commands:

To use a SQL DB: .\wsusutil.exe postinstall SQL_INSTANCE_NAME=”SERVER\Instance” CONTENT_DIR=”<drive>:\WSUS”

To use WID: .\wsusutil.exe postinstall CONTENT_DIR=”<drive>:\WSUS”

– Reboot the Server

Logfiles for WSUS post-Installation tasks are located in the %temp% folder. There should be a log file with the .TMP file extension. (EXAMPLE: tmp56B7.tmp)

Sources:
http://serverfault.com/questions/449914/how-to-completely-wipe-wsus-and-start-again
https://ittherapist.net/2013/12/17/how-to-fix-windows-server-2012-and-2012-r2-wsus-post-install-fails-immediately/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.