none
WMI Reporting Incorrect Boot Time RRS feed

  • Question

  • Hi all - I rely on an SCCM query to report on the last boot time for servers. One server in particular is incorrectly reporting its boot time as 1/1/2008. Details:

    • This is a Windows Server 2012 R1 machine.
    • 'net statistics server' correctly reports a boot time of 16/01/2016 11:07:11PM
    • 'wmic os get LastBootUpTime' reports '20080101080522.02.69.89+480', which translated is 01/01/2008 08:05AM, or 2955 days uptime.
    • I've run WMIDiag 2.2 and this concluded WMI is healthy.

    ...so the issue is with WMI. This isn't a server that can be restarted easily, so I'm looking for a solution that isn't as drastic as repairing WMI and can be done while still up.

    Has anyone else encountered such an issue?

    Thanks in advance

    Wednesday, February 3, 2016 3:29 AM

Answers

  • You could perhaps try running mofcomp on cimwin32 which contains the Win32_OperatingSystem class. I haven't run into your exact issue before but I have seen this fix other weird WMI issues like Win32_OperatingSystem not having an instance at all. It's more surgical than repairing the entire repository. This link goes into some detail about how to do it:

    https://technet.microsoft.com/en-us/library/ff406382.aspx#H28


    • Edited by KevinMJohnston Wednesday, February 3, 2016 4:55 AM
    • Marked as answer by mvjjkc Wednesday, February 3, 2016 8:51 PM
    Wednesday, February 3, 2016 4:54 AM

All replies

  • This has been many time before and there is no know solution.

    However you could create a custom script to write the date and time into your own wmi class and the. Inventory that....


    Garth Jones | My blogs: Enhansoft and Old Blog site | Twitter: @GarthMJ

    Wednesday, February 3, 2016 3:44 AM
    Moderator
  • So is this a permanent issue or is it actually resolvable with a WMI repair?

    If that's my only option, I'll get it done rather than create a custom solution for a single server.

    Thanks,

    Wednesday, February 3, 2016 3:45 AM
  • You could perhaps try running mofcomp on cimwin32 which contains the Win32_OperatingSystem class. I haven't run into your exact issue before but I have seen this fix other weird WMI issues like Win32_OperatingSystem not having an instance at all. It's more surgical than repairing the entire repository. This link goes into some detail about how to do it:

    https://technet.microsoft.com/en-us/library/ff406382.aspx#H28


    • Edited by KevinMJohnston Wednesday, February 3, 2016 4:55 AM
    • Marked as answer by mvjjkc Wednesday, February 3, 2016 8:51 PM
    Wednesday, February 3, 2016 4:54 AM
  • It comes an goes on some computers, I have found no permanent fix. It also seem to be related the how the computer was rebooted, was it a hard boot or a soft boot (reboot) too.

    Garth Jones | My blogs: Enhansoft and Old Blog site | Twitter: @GarthMJ

    Wednesday, February 3, 2016 3:05 PM
    Moderator
  • Ultimately, this has nothing to with ConfigMgr. The data is provided by Windows itself so asking in a Windows forum may get a better answer.

    Jason | http://blog.configmgrftw.com | @jasonsandys

    Wednesday, February 3, 2016 6:00 PM
  • Brilliant - this link was exactly what I was looking for. It seems only a small portion of WMI was broken and recompiling the MOF & MFL files in c:\windows\system32\wbem with the command:

    for %i in (*.mof, *.mfl) do Mofcomp %i

    ...has worked. Much appreciated!


    • Edited by mvjjkc Thursday, February 4, 2016 2:48 AM Added relative path for command to run.
    Wednesday, February 3, 2016 8:51 PM
  • Brilliant - this link was exactly what I was looking for. It seems only a small portion of WMI was broken and recompiling the MOF & MFL files with the command:

    for %i in (*.mof, *.mfl) do Mofcomp %i

    ...has worked. Much appreciated!

    At least you know how and what to fix next time it happens.

    BTW, if you wanted to get fancy you could write a batch file and send it out to any system with a last boot date older than say 12 months.


    Garth Jones | My blogs: Enhansoft and Old Blog site | Twitter: @GarthMJ

    Wednesday, February 3, 2016 9:05 PM
    Moderator