none
Windows Update List Query

    Question

  • Hello.

    I'm developing WindowsUpdate Custom Control Function of Windows10.(and the lower versions already completed.

    I'm using IUpdateSearcher2, and the code is below.

       sQuery = _T("isinstalled=1");

       pUpdateSearcher->Search(CComBSTR(sQuery), &pResult);

    I thought, this function is usable in the Windows Power Shell, so, I found the script, and execute the query in Windows 7, and it worked!

    But, I run the query in Windows 10, but it didn't worked.

    So, I'm just qurious. Is there any method to query Windows Core Update List using PowerShell or any other methods in Windows 10?

                $Session = New-Object -ComObject Microsoft.Update.Session           

                $Searcher = $Session.CreateUpdateSearcher()           
                $Criteria = "IsInstalled=1"           
                $SearchResult = $Searcher.Search($Criteria)          

                $SearchResult.Updates

    It works in Windows 7(return update list), but dosen't work in Windows 10.(return 0 list)

    Monday, February 01, 2016 2:51 AM

Answers

All replies