WSUS preparation for Windows 10 Feature Upgrades
-
After battling for a while with WSUS and Windows 10 Feature Upgrades, I have compiled the following based on the experience:
1- Download SQL Server Management Studio
https://www.microsoft.com/en-us/download/confirmation.aspx?id=290622- Install SQL Server Management Studio and reboot the server.
3- Open your SQL Server Management Studio and connect to the WSUS Database:
4- Select the SUSDB Database
5- Run the following query:
select Count(*) from tbFile as f, tbFileForRevision as fr, tbRevision as r, tbUpdate as u, tbProperty as p where f.FileDigest = fr.FileDigest and fr.RevisionID = r.RevisionID and r.LocalUpdateID = u.LocalUpdateID and p.RevisionID = r.RevisionID and (f.FileName like '%15063%.esd' or f.FileName like '%14393%.esd' or f.IsEncrypted = 1) and f.DecryptionKey is null and p.PublicationState = 0
6-If the results are > 0 then you need to continue below. If not you can service Windows 10 Feature upgrades by making sure your WSUS server has this:
https://support.microsoft.com/en-us/help/3159706/update-enables-esd-decryption-provision-in-wsus-in-windows-server-20127- Run the following powershell (As admin):
Get-WsusClassification | Where-Object -FilterScript {$_.Classification.Title -Eq “Upgrades”} | Set-WsusClassification -Disable
8- Decline all the Windows 10 Upgrades through Powershell ISE (As admin
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer(); $wsus.GetUpdates() | Where {$_.UpdateClassificationTitle -eq 'Upgrades' -and $_.Title -match 'Windows 10'} ` | ForEach-Object {$_.Decline(); Write-Host $_.Title declined}
9- Remove all the Upgrades from the Database through Powershell ISE
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer(); $wsus.GetUpdates() | Where {$_.UpdateClassificationTitle -eq 'Upgrades' -and $_.Title -match 'Windows 10'} ` | ForEach-Object {$wsus.DeleteUpdate($_.Id.UpdateId.ToString()); Write-Host $_.Title removed}
10- Run the following query on SQL Management Studio
declare @NotNeededFiles table (FileDigest binary(20) UNIQUE) insert into @NotNeededFiles(FileDigest) (select FileDigest from tbFile where FileName like '%.esd%' except select FileDigest from tbFileForRevision) delete from tbFileOnServer where FileDigest in (select FileDigest from @NotNeededFiles) delete from tbFile where FileDigest in (select FileDigest from @NotNeededFiles)
11- Enable Upgrades in WSUS again via powershell
Get-WsusClassification | Where-Object -FilterScript {$_.Classification.Title -Eq “Upgrades”} | Set-WsusClassification
12- Sync WSUS
$s = Get-WsusServer $sub = $s.GetSubscription() $sub.StartSynchronization()
13- Approve the Feature Upgrade you want.
14- Now ready to install on workstations.
-
@dbeato Thanks for writing this up. The amount of pain to get this done tho, yuck.
-
@travisdh1 said in WSUS preparation for Windows 10 Feature Upgrades:
@dbeato Thanks for writing this up. The amount of pain to get this done tho, yuck.
It was painful even to write it
-
Wow. Definitely not doing that if I have the same problems as you.
Ill just go around and install the upgrade manually.
Not even sure why MS still has WSUS, it is nothing but problems unless you spend hours a week fixing and maintaining it. -
@momurda said in WSUS preparation for Windows 10 Feature Upgrades:
Wow. Definitely not doing that if I have the same problems as you.
Ill just go around and install the upgrade manually.
Not even sure why MS still has WSUS, it is nothing but problems unless you spend hours a week fixing and maintaining it.I hear ya, this took me an hour to research, make sure to gather correct logs and then do the how-tos.