Last Synchronization

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of CEF Account CEF Account 10 months, 3 weeks ago.

  • Author
    Posts
  • #34073
    Profile photo of CEF Account
    CEF Account
    Participant

    Does anyone know of a cmdlet that will provide me with a list of downstream servers that have not synchronized within the last x number of days. The information is visually available on the WSUS upstream Server console under "Last Synchronization" but I couldn't find any information if that could be extracted via PS

  • #34082
    Profile photo of Tim Pringle
    Tim Pringle
    Participant

    Hi there,

    Hmmmm client side, you might be able to get something similar using Microsoft.Update.Session, though it reports the date of last update as opposed to last check.

    Are you using WSUS or SCCM Software Updates btw?

    $Session = New-Object -ComObject Microsoft.Update.Session
        $Searcher = $Session.CreateUpdateSearcher()
        $LastUpdate = $Searcher.QueryHistory(0, 1) | Select-Object -ExpandProperty Date
    

    If it's not available via cmdlets or com/dotnet objects on the wsus server, then you might need to look into querying the database, though i think thats WID which i've never had reason to query.

  • #34085
    Profile photo of Graham Beer
    Graham Beer
    Participant

    Hi Tim,

    Your knowledge of .NET Tim is awesome. I was looking at your site, http://www.powershell.amsterdam/ (Free plug for you !!) and was thoroughly impressed. How did you get to such a good level on .NET ? (Feel free to e-mail me at Graham.Beer@outlook.com).

  • #34091
    Profile photo of CEF Account
    CEF Account
    Participant

    Thanks, Tim for the update. However, the last update is just for the client side, and that too, is that of patching status, nit synchronization. I'll try the WID query route.

You must be logged in to reply to this topic.