WSUS Post-deployment Configuration Failed – Windows Server 2022

by | Last updated Oct 29, 2022 | Published on Jun 2, 2022 | Guides, WSUS

If you are trying to install WSUS on a server using the Windows Internal Database (WID), you will likely NOT receive this error. This is because even on Windows Server 2022, the WID is an older special embedded version of SQL server. We can see this by using the TSQL command SELECT @@version.

  • WID version on Server 2012 – Microsoft SQL Server 2012 – 11.0.2100.60 (X64)
  • WID version on Server 2012R2 – Microsoft SQL Server 2012 – 11.0.2100.60 (X64)
  • WID version on Server 2016 – Microsoft SQL Server 2014 – 12.0.2000.8 (X64)
  • WID version on Server 2019 – Microsoft SQL Server 2014 (SP2-GDR) (KB4057120) – 12.0.5214.6 (X64)
  • WID version on Server 2022 – Microsoft SQL Server 2014 (SP2-GDR) (KB4057120) – 12.0.5214.6 (X64)

WSUS installs perfectly fine when using the WID.

However, if you try to install WSUS on a SQL Server you may get a “WSUS Post-deployment Configuration Failed” error message. If you go look at the Post-Install log, you will see:

Microsoft.UpdateServices.Administration.CommandException: The schema version of the database is from a newer version of WSUS
than currently installed. You must either patch your WSUS server to at least
that version or drop the database.
at Microsoft.UpdateServices.Administration.ConfigureDB.CheckForUnsupportedVersion(DBInstallType installType, Boolean dbExists)
at Microsoft.UpdateServices.Administration.ConfigureDB.ConnectToDB()
at Microsoft.UpdateServices.Administration.ConfigureDB.Configure()
at Microsoft.UpdateServices.Administration.ConfigureDB.Run(String instanceName, Action`1 logWriter, Boolean contentLocal)
at Microsoft.UpdateServices.Administration.PostInstall.Run()
at Microsoft.UpdateServices.Administration.PostInstall.Execute(String[] arguments)

To fix this:

Open a PowerShell in elevated mode by using “Run as administrator”

Run the code below to change 1 line of code in the VersionCheck.sql file:

Start-Process takeown.exe -ArgumentList '/f "C:\Program Files\Update Services\Database\VersionCheck.sql"' -Wait
Start-Process icacls.exe -ArgumentList '"C:\Program Files\Update Services\Database\VersionCheck.sql" /grant "administrator:(F)"' -Wait
(Get-Content "C:\Program Files\Update Services\Database\VersionCheck.sql") -replace "(^DECLARE @scriptMinorVersion\s+ int = \(11\)$)","DECLARE @scriptMinorVersion int = (51)" | Set-Content "C:\Program Files\Update Services\Database\VersionCheck.sql"

This will find the line

DECLARE @scriptMinorVersion     int = (11)

and replace it with

DECLARE @scriptMinorVersion     int = (51)

After this has completed, launch the post-installation steps again and it should now go through successfully.

Restoring Windows Server Update Services From Backups

Restoring Windows Server Update Services From Backups

You probably already know that backing up your Windows Server Updates Services is crucial. You want to back up because restores are faster than rebuilding WSUS. Although it’s not difficult to rebuild, it takes valuable time we know you don’t have. Your WSUS...

Backing Up Windows Server Update Services

Backing Up Windows Server Update Services

You probably already know that backing up your Windows Server Update Services is crucial. You want to back up because restores are faster than rebuilding WSUS. Although it’s not difficult to rebuild, it takes valuable time we know you don’t have. Your WSUS...