ScioSoft's Community Blogs Optimized IT musings for the technically inclined

PowerShell: Get OS Installation Date

by James Fielding 18. October 2011 19:43
Here is a quick, and oh-so-easy, one-liner to see when you installed a machine’s Operating System:
([WMI]'').ConvertToDateTime((Get-WmiObject Win32_OperatingSystem).InstallDate)
The main part of the command gets the install date:
(Get-WmiObject Win32_OperatingSystem).InstallDate
The problem is, if you just run this command, the result is not so human-friendly:
To fix this up, we can apply the ConvertToDate method, which is actually a Common helper method (that has nothing to do with the Win32_Service WMI class). To do this I used /\/\o\/\/’s method of creating an "Empty" WMI class for this ([WMI]''):
Once we do this, we get a nice, human-friendly result:
March-28-09 1:48:54 PM
Happy OS Dating (…judging by the date on my system, it looks like it is time for a reimage),
James Fielding

Sciosoft Systems is a Canadian web design & development company based in Muskoka, which is in central Ontario. We provide ASP.NET website & Windows Server application development services to small and medium-sized business, as well as local government and not-for-profit groups. If you have a website project you’d like to discuss, please visit us at

Share |

Tags: , ,

IT Systems | PowerShell

Comments (1) - India
1/27/2012 4:53:45 AM #

Ping back from

Comments are closed


Comment RSS

The opinions expressed herein are the personal opinions of the contributors and do not necessarily represent the views of Sciosoft Systems Inc.