Hello, i have an issue on multiple Windows 2008 R2 Servers.
When running the following demonstration VBS script (powershell equivalent is behaving the same) :
'----------LIST INSTALLED UPDATES-------------
Set updateSession = CreateObject("Microsoft.Update.Session")
Set updateSearcher = updateSession.CreateupdateSearcher()
WScript.Echo "Searching for updates..." & vbCRLF
Set searchResult = updateSearcher.Search("IsInstalled=1")
msgbox searchresult.updates.count
In 90% of our servers the API reports a count of 0 updates.
However the searchhistory method returns hundred of updates, so obviously there is something wrong going on...
I tried several things : check for resultcode (returns 2, means success), tried various search filters, tried online=true and online=false.
Same result, 0.
However Windows 7 does not display the same issue.
Somebody could explain or reproduce the issue ?
PS : the updates are managed in our environment by SCE 2010