WSUS Post-deployment Configuration Failed – Windows Server 2022

by | Last updated 2023.05.20 | Published on 2022.06.02 | Guides, WSUS

If you try to install WSUS on Server 2022 using the Windows Internal Database (WID) or 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.

What do I do when I run out of space on a WSUS Server?

What do I do when I run out of space on a WSUS Server?

Oops! Doh! Huh? %#@*!!! These are all the words you think of in your head when you're investigating what is happening with your WSUS server and realize that WSUS just ate all of your disk space and there is 0 bytes free. What do you do next? If WSUS was downloading...

How to Remove WSUS Completely and Reinstall it

How to Remove WSUS Completely and Reinstall it

The steps to remove WSUS and reinstall WSUS are pretty standard but they do have some variances on how WSUS was installed in the first place. To remove WSUS completely, you need to: Remove WSUS Role You can remove the role through the GUI using Server Manager or You...

Role Based Access Security

Role Based Access Security

"Change how you think; Change your life." If you think you know how to administer a file server, maintain permissions and groups, but want to know a better way; a more efficient way, then you have to change how you think about permissions and security. Watch these...