Windows Server 2012 – WSUS Post-Install Tasks Fail Immediately

Not long ago, I was trying to re-install WSUS on a server that would not generate the ‘WSUS Administration’ website.

Post-installation tasks would also fail without giving me much to go on. After some time researching, I found several posts on message boards that all said to do different things to resolve the issue. Some of them even said to either reload the OS on the server (not always an option in a production environment), or call Microsoft for help (which as we all know costs $$$).

Here’s what I found…

In the installation log located in the %temp% folder there should be a log file with the .TMP file extension. (EXAMPLE: tmp56B7.tmp)

When looking at this file, it told me that a file it was looking for was not found, or corrupt.

When I ran the WSUS Console I saw the following:

___________________________________________________________________________

The WSUS administration console has encountered an unexpected error. This may be a transient error; try restarting the administration console. If this error persists,

Try removing the persisted preferences for the console by deleting the wsus file under %appdata%\Microsoft\MMC\.

The WSUS administration console has encountered an unexpected error. This may be a transient error; try restarting the administration console. If this error persists,

Try removing the persisted preferences for the console by deleting the wsus file under %appdata%\Microsoft\MMC\.

System.NullReferenceException — Object reference not set to an instance of an object.

Source

Microsoft.UpdateServices.UI.AdminApiAccess

Stack Trace:

at Microsoft.UpdateServices.UI.AdminApiAccess.AdminApiTools.GetLocalInstallDir()

at Microsoft.UpdateServices.UI.AdminApiAccess.Constants..cctor()

** this exception was nested inside of the following exception **

System.TypeInitializationException — The type initializer for ‘Microsoft.UpdateServices.UI.AdminApiAccess.Constants’ threw an exception.

Source

Microsoft.UpdateServices.UI.SnapIn

Stack Trace:

at Microsoft.UpdateServices.UI.SnapIn.Scope.RootScopeNode.GetComputerTargetFromCmdLine()

at Microsoft.UpdateServices.UI.SnapIn.Scope.RootScopeNode.AddServerScopeNodeFromCmdLine()

at Microsoft.UpdateServices.UI.SnapIn.Common.SnapInManager.OnLoadCustomData(AsyncStatus status, Byte[] persistenceData)

___________________________________________________________________________

To resolve the issue, I performed the following steps (in order):

1) Open a PowerShell session as Administrator and uninstall WSUS completely with the following command:

Remove-WindowsFeature –Name UpdateServices,UpdateServices-DB,UpdateServices-RSAT,UpdateServices-API,UpdateServices-UI –IncludeManagementTools

2) Delete the registry key HKLM\SOFTWARE\Microsoft\Update Services

3) Delete the WSUS file from %appdata%\Microsoft\MMC

4) Delete the Folder %ProgramFiles%\Update Services along with all of its subfolders and files.

5) Reboot the server

6) Run the System File Checker to find and repair any inconsistencies by typing the command below into the PowerShell prompt.

SFC /scannow

7) Reboot the server

8) Verify IIS is installed and working without errors

9) Open a Powershell session as Administrator an install WSUS with the following command:

To use a SQL DB:

Install-WindowsFeature –Name UpdateServices,UpdateServices-DB -IncludeManagementTools

To use WID:

Install-WindowsFeature –Name UpdateServices –IncludeManagementTools

10) 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”

11) Wait for the command to complete successfully.

12) If you are using this WSUS instance as part of a farm, then open the Admin Console and configure your updates.

13) If you are using this instance as part of the roles within an SCCM Implementation, open the SCCM Console and install the Software Update point role.

Configure as needed and happy patching!

Advertisements

7 responses to “Windows Server 2012 – WSUS Post-Install Tasks Fail Immediately

  1. I think the space between UpdateServices, and UpdateServices-DB in the command

    Install-WindowsFeature –Name UpdateServices, UpdateServices-DB -IncludeManagementTools

    has to be removed. Before removing it it was giving the errors

    Feature WID Database has a conflict with the features Database.
    Feature Database has a conflict with the features WID Database.

    JP

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s