Home > PowerShell, Tips, wmi > how to know my windows operating system installation time?

how to know my windows operating system installation time?

Installation of time windows will be saved in Win32_OperatingSystem WMI class. Alternatively it will be available in registry(HKLMSOFTWAREMICROSOFTWINDOWS NTCURRENTVERSIONINSTALLDATE). So, now you need to figure out your own way of querying values from either wmi or from registry. Being a fan of powershell, I want you to help with two line PS code to get the installation date/time.

$osinstalledtime = gwmi win32_operatingSystem
write-host $osinstalledtime.ConvertToDateTime($osinstalledtime.InstallDate)

That’s it. I will give you the details you need.

No related content found.

  1. Willy Mcglone
    April 8, 2010 at 5:39 pm | #1

    awesome post dude

  2. April 8, 2010 at 6:54 pm | #2

    Thank you….

  3. Uma
    December 13, 2010 at 4:54 am | #3

    I will give you the details you need.
    or It will give you the details you need.

  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>