locked
Last Windows Update except DefinitionUpdate for Microsoft Endpoint Protection RRS feed

  • Question

  • Heres the script

    Set objSession = CreateObject("Microsoft.Update.Session")
    Set objSearcher = objSession.CreateUpdateSearcher

    Set colHistory = objSearcher.QueryHistory(1, 1)

    For Each objEntry in colHistory
        Wscript.Echo "Title: " & objEntry.Title
        Wscript.Echo "Update application date: " & objEntry.Date
    Next

    I dont want any result about the definition update if thats that latest update that been installed...

    Please thank you

    Thursday, June 12, 2014 11:01 PM

Answers

All replies

  • What's your question?

    -- Bill Stewart [Bill_Stewart]

    Thursday, June 12, 2014 11:52 PM
  • My question is ...

    How do i add the IF statement..

    only i want to show any latest patch update except DefinitionUpdate for Microsoft Endpoint Protection..

    Friday, June 13, 2014 12:06 AM
  • My question is ...

    How do i add the IF statement..

    only i want to show any latest patch update except DefinitionUpdate for Microsoft Endpoint Protection..


    Are you searching for a specific patch?

    ¯\_(ツ)_/¯

    Friday, June 13, 2014 12:19 AM
  • Nope...

    I just really want to see whats the latest Patch update in the machine ... but if the latest patch is that DefinitionUpdate.. dont show me that result.. show me that latest update that is not DefinitionUpdate?

    :) :) :) :0

    Friday, June 13, 2014 12:27 AM
  • There is no way to say "I want the latest patch for product 'X'"

    You need to either look at the product version or search for a specific KB.


    ¯\_(ツ)_/¯

    Friday, June 13, 2014 12:41 AM
    • Marked as answer by Bill_Stewart Wednesday, July 2, 2014 3:05 PM
    Friday, June 13, 2014 12:46 AM
  • yeah... still cant make it eh.. i can do it via ps1... with 

    $objSession = New-Object -com "Microsoft.Update.Session"
    $objSearcher= $objSession.CreateUpdateSearcher()
    $colHistory = $objSearcher.QueryHistory(0, 1000)

    Foreach($objEntry in $colHistory)
    {
        if ($objEntry.Title -notmatch "Definition Update for Microsoft Endpoint Protection")
        {
            Write-host $objEntry.Title
            Write-host $objEntry.Date
            break
        }
    }

    ----------------------------------------------------

    so pretty much trying to convert it in to vbs

    Friday, June 13, 2014 2:52 AM
  • Is that supposed to be funny?


    ¯\_(ツ)_/¯

    Friday, June 13, 2014 5:19 AM
  • I just really want to see whats the latest Patch update in the machine ... but if the latest patch is that DefinitionUpdate.. dont show me that result.. show me that latest update that is not DefinitionUpdate?

    Why?


    -- Bill Stewart [Bill_Stewart]

    Friday, June 13, 2014 12:01 PM