How do I find the install time and date of Windows?

后端 未结 20 1274
孤街浪徒
孤街浪徒 2020-12-12 11:36

This might sound like a little bit of a crazy question, but how can I find out (hopefully via an API/registry key) the install time and date of Windows?

The best I c

20条回答
  •  没有蜡笔的小新
    2020-12-12 12:05

    Try this powershell command:

    Get-ChildItem -Path HKLM:\System\Setup\Source* | 
     ForEach-Object {Get-ItemProperty -Path Registry::$_} | 
         Select-Object ProductName, ReleaseID, CurrentBuild, @{n="Install Date"; e={([DateTime]'1/1/1970').AddSeconds($_.InstallDate)}} | 
             Sort-Object "Install Date"
    

提交回复
热议问题