Issue

When scanning a Windows machine if the agent experiences an issue reading the Windows Update history you can test the access simply using VBscript.



Method


  • Enter the following code into a text file, replacing the computer name with the name of the machine with the issue.

  • Save the file with a .vbs extension


Set session = CreateObject("Microsoft.Update.Session", "ComputerName")

Set updateSearcher = session.CreateUpdateSearcher

intHistoryCount = updateSearcher.GetTotalHistoryCount

Set historyEntries = updateSearcher.QueryHistory(1, intHistoryCount)

For Each historyEntry in historyEntries

                   Wscript.Echo historyEntry.Title

Next 


  • Run a command prompt as an administrator



  • Start the script by running and note any errors shown
    cscript filename.vbs