Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Windows updates

Windows updates

Scheduled Pinned Locked Moved Support
11 Posts 7 Posters 40.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    D
    dersonik
    wrote on last edited by
    #1

    what this details means:

    System update: last detect time = 1461028113
    System update: last download time = 1460658737
    System update: last install time = 1460630098

    Windows server 2012

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi,

      it's time of last system update detection, download, and installation as UNIX time (seconds since epoch).

      Best regards,
      Victor

      1 Reply Last reply
      0
      • J
        J
        JRH
        wrote on last edited by
        #3

        Hi dersonik

        Run this in your transformation properties and it will return you the date and time from the unix time provided by the poll.

        strftime("%Y-%m-%d %H:%M", $1)

        Cheers

        1 Reply Last reply
        0
        • D
          D
          dersonik
          wrote on last edited by
          #4

          Thank you very much

          1 Reply Last reply
          0
          • J
            J
            JRH
            wrote on last edited by
            #5

            no Problem

            I had to figure out the hard way 🙂

            1 Reply Last reply
            0
            • D
              D
              dersonik
              wrote on last edited by
              #6

              any tips how grab the numbers of update to download?

              1 Reply Last reply
              0
              • J
                J
                jhonnyvey
                wrote on last edited by
                #7

                Make a shellexec to cmd.
                Use grep for windows and look in C:\windows\windowsupdate.log

                If are you using windows 10:

                Windows Update logs are now generated using ETW (Event Tracing for Windows).
                Please run the Get-WindowsUpdateLog PowerShell command to convert ETW traces into a readable WindowsUpdate.log.
                For more information, please visit http://go.microsoft.com/fwlink/?LinkId=518345

                1 Reply Last reply
                0
                • R
                  R
                  rainerh
                  wrote on last edited by
                  #8

                  I have a Windows Server 2016 but this DCI will not work: System.Update.LastInstallTime
                  Error: Cannot get current parameter value: Communication failure

                  1 Reply Last reply
                  0
                  • A
                    A
                    Akira
                    wrote on last edited by
                    #9

                    2.0.8 still not working on 2016

                    1 Reply Last reply
                    0
                    • R
                      R
                      rainerh
                      wrote on last edited by
                      #10

                      With new Version nxagent-2.1-RC1-x64 I will have the same error:
                      Cannot get current parameter value: Operation cannot be completed due to agent error

                      1 Reply Last reply
                      0
                      • T
                        T
                        Tursiops
                        wrote on last edited by
                        #11

                        I am guessing that the System.Update.LastInstallTime is based on reading the Windows Update registry value, which Microsoft removed with Windows 10 and Server 2016, i.e. it won't work anymore.

                        The following PowerShell gives you the date of the last successful Windows Update installation (works for me, but knowing when my system last installed updates, the time appears to be in UTC):

                        $updateSearch = (New-Object -ComObject Microsoft.Update.Session ).CreateUpdateSearcher()
                        ($updateSearch.QueryHistory(0,$updateSearch.GetTotalHistoryCount())| ?{$_.ResultCode -eq 2}|Sort-Object -Property Date -Descending).Date|Select -First 1
                        

                        For some more background into, quoting "https://stackoverflow.com/questions/33732541/powershell-how-to-get-date-of-last-windows-update-install-or-at-least-checked-f":

                        $Session = New-Object -ComObject Microsoft.Update.Session
                        $Searcher = $Session.CreateUpdateSearcher()
                        $HistoryCount = $Searcher.GetTotalHistoryCount()
                        # http://msdn.microsoft.com/en-us/library/windows/desktop/aa386532%28v=vs.85%29.aspx
                        $Searcher.QueryHistory(0,$HistoryCount) | ForEach-Object {$_}
                        

                        This will list all updates which the system tried to install, including a timestamp (which on my system appears to be UTC) and a result code.
                        Those translate to:

                        0 = Not Started
                        1 = In Progress
                        2 = Succeeded
                        3 = Succeeded With Errrors
                        4 = Failed
                        5 = Aborted
                        

                        If a patch failed to install several times, it is supposedly listed several times as well. I cannot confirm that, as I have no failed patches in my list.
                        It also appears that the large cumulative updates like the Creators Update resets the contents of the list. Mine only goes back to said Creators Update.
                        Either way, with a bit of scripting you can return a few more things, like the number of unique patches which have failed to install.

                        I am not sure if the status 0 could be used to determine how many patches the system knows about that are not installed yet.

                        1 Reply Last reply
                        0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        Powered by NodeBB Contributors
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups