Weird Windows 8 Update error

So far I’ve only noticed this on Windows 8 Enterprise, so can’t comment as to whether this would affect any other flavour of W8. However, I decided to use my own PowerShell script (see previous post!) to update my W8Ent host. It seemed to be going fine but I kept on installing updates assuming that the reboot detection was working- which I’m pretty sure wasn’t  :)) Anyway, I went off to lunch and left my PC rebooting… and came back, only to find that the updates configuration was failing. I had to resort to powering off at the power switch, and eventually- after hammering F8 repeatedly- was able to do a system restore and it’s back to normal now (incidentally, the system restore process reported itself as having failed but it didn’t).

I haven’t had much luck identifying which particular update crashed it yet, but so far I think it’s KB2768703. There have been a lot of WER log entries relating to this update, it’s a critical update (matching the system restore title) and the timing is right. I’m going to restart doing updates, this time rebooting after each batch of updates…

EDIT 17-MAY-2013@16:34 : I’m pretty sure it is now KB2768703. This is the only KB installer that seems to crop up in the WER errors (application log), however I have noticed that Bing Desktop also generates WER errors so it may be that that is clashing. Anyway, I’m going to avoid installing the above update for now (using the Windows Update client so I can de-select it).

Advertisements

Powershell menu to perform WSUS tasks

After my previous post, WSUS is actually a bit more complicated than I’d thought so I’ve developed an entire, stand-alone WSUS script because that previous one was getting quite big.

A couple of notes: the location of the log files aren’t really important, when I started with the script it was just listing the updates inside the PowerShell windows which wasn’t very visually friendly. So I stuck them in a text file to make it easier to read. The other thing is, it doesn’t seem to run properly immediately after a reboot- I don’t know if this is just my Server Core 2012 VM being a bit sluggish, but it just does nothing if you run it within 5 or 10 minutes of rebooting. But it does work, and I’ve kept an eye on our WSUS Server and it now has all relevant updates installed.

Oh great. All the formatting has gone as well. Sorry about that, it was neatly tabbed before…

EDIT 17-MAY-2013: After some problems with my main W8 host, I’ve modified the script below to remove the option not to reboot (which I’m not sure worked anyway). So now the script automatically reboots after running a batch of updates. I’ve left the code in for interest, but would strongly advise removing the lines highlighted in red below.

======================================================================================================================================================================================
#Split in to three main sections: first of all just searches for updates, next option is to install, then final option is to display installed updates

#Equivalent to DOS CLS- just wipes the console screen
Clear-Host

#Sets the menu up- this is a 4-option menu
$menuText=”1) Display new (not yet installed) updates in Notepad”,”2) Download and install new updates”,”3) Display installed updates in Notepad”,”4) Quit”

#Displays the menu options
$menuText

do
{
#Starts the menu system- asks for user to make a choice
switch ($chooseOption=Read-Host -Prompt “Please choose your option”)
{
1 {
#Deletes the old log file- this stops the log file displaying false (too many) updates
Remove-Item C:\Support\new_WSUS_Patches.log
#Defines update criteria
$newUpdateCriteria = “IsInstalled=0 and Type=’Software'”
#Search for new updates.
$newUpdateSearcher = New-Object -ComObject Microsoft.Update.Searcher
$newSearchResults = $newUpdateSearcher.Search($newUpdateCriteria)
#Catches 0 updates error, gracefully exists when there are no new updates
If ($newSearchResults.updates.Count -eq 0) {
Clear-Host
Write-Host “I couldn’t find any updates…”
Start-Sleep 5
}
Else {
#This just performs the search, outputs the results to a text file and then opens the text file
$newSearchResults.Updates | ForEach-Object {Out-File -FilePath C:\Support\new_WSUS_Patches.log -Append -InputObject $_.Title }
Invoke-Item C:\Support\new_WSUS_Patches.log
}
cls
$menuText
}
2 {
#Define update criteria.
$newUpdateCriteria = “IsInstalled=0 and Type=’Software'”
#Search for new updates.
$newUpdateSearcher = New-Object -ComObject Microsoft.Update.Searcher
$newSearchResults = $newUpdateSearcher.Search($newUpdateCriteria)
If ($newSearchResults.updates.Count -eq 0) {
Clear-Host
Write-Host “I couldn’t find any updates…”
Start-Sleep 5
cls
$menuText
}
Else {
#Download updates.
$Session = New-Object -ComObject Microsoft.Update.Session
$Downloader = $Session.CreateUpdateDownloader()
$Downloader.Updates = $newSearchResults.Updates
$Downloader.Download()

#Install updates.
$Installer = New-Object -ComObject Microsoft.Update.Installer
$Installer.Updates = $newSearchResults.Updates
$installUpdates = $Installer.Install()
#Reboot if required by updates.
If ($Result.rebootRequired) {
Clear-Host
Write-Host “This computer needs to be restarted so will do so in 1 minute”
Start-Sleep 60
Restart-Computer
}
Else {
Clear-Host
Write-Host “Reboot NOT required!”
Start-Sleep 5
cls
$menuText
}
}
}
3 {
#Deletes the old log file
Remove-Item C:\Support\installed_WSUS_Patches.log
#Define update criteria.
$installedUpdateCriteria = “IsInstalled=1 and Type=’Software'”
#Search for installed updates.
$installedUpdateSearcher = New-Object -ComObject Microsoft.Update.Searcher
$installedSearchResults = $installedUpdateSearcher.Search($installedUpdateCriteria)
$installedSearchResults.Updates | ForEach-Object {Out-File -FilePath C:\Support\installed_WSUS_Patches.log -Append -InputObject $_.Title }
Invoke-Item C:\Support\installed_WSUS_Patches.log
cls
$menuText
}
4 {Break}
}
#As soon as the user preses 4, the script exits
} while ($chooseOption -ne 4)

Useful Dell SUU commands

I know suu.cmd has accepted various switched for a long time now, but this is the first time I’ve bothered to engage with it!

So, running SUU v 7.1.1.162:

\\some server\some share\suu.cmd -comparison

will generate a report telling you what can and can’t be upgraded. Most of the time you won’t care, but it’s worth remembering that this program will update network firmware, drivers and disk firmware etc so only run on critical systems after hours.

Then,

\\some server\some share\suu.cmd -upgradeonly

will ONLY upgrade components, never downgrade. It’ll do everything in one hit so you’ll probably need to reboot after this, and you may lose networking a lot as it runs so running suu either stood at the console or via remote desktop is recommended.