PowerShell: Get Windows Install Date

Need to know when Windows was installed on a machine - for auditing, troubleshooting, or just curiosity about how old a system is? This one-liner pulls the install date straight from the OS.

Prerequisites:

  • Privileges: None
  • Module: Built-in, no import needed

Quick Command:

Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object InstallDate

Example Output:

InstallDate
-----------
7/16/2026 6:52:37 PM
📦
Want all of them at once?
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.

How It Works:

  • Get-CimInstance -ClassName Win32_OperatingSystem queries the operating system class through CIM/WMI, which holds core system details like version, build number, and architecture.
  • InstallDate returns the date and time Windows was originally installed on the machine, already converted into a readable local date/time format by CIM.
  • Select-Object trims the output down to just this one property, since Win32_OperatingSystem also returns a lot more data (like Caption, Version, or BuildNumber) that isn't needed for a quick install date check.