Windows

Determine a Windows Server build date with these one-liners

With Windows Server systems, it can be difficult to determine when a system was built. Here's how you can determine a system's build date with two quick commands.

If you're asked, "When was this server installed?" you may have to get creative to determine the answer. Determining when a server was built can be tricky because administrators may have cleared out the event and system logs, or they may have rolled over due to size limits.

One knee-jerk reaction to the question would be to look into Active Directory for the age of the computer account, but that may not tell the full tale. If a Windows Server is joined to a domain with a computer account name that already exists, the date on the object in Active Directory may not be accurate. Other tricks, such as looking for file dates on the server, can be inconclusive, especially if low-level tasks have been performed on the server, including a physical-to-virtual conversion, a rebuild of the OS, or a system restore to a new piece of hardware (also known as a bare metal recovery).

If you are out to seek the age of this particular instance of Windows, then you need Windows tell the story. The following command will tell you when Windows was installed:

systeminfo | find /i "install date"

This finds and returns one specific value from many values of a system including make, model, processor, uptime, and other values. The systeminfo command is common across all versions of Windows Server and addresses the key issues that can make the intuitive answers unclear. This can also be done via PowerShell. The equivalent command in PowerShell is shown below:

([WMI]'').ConvertToDateTime((Get-WmiObject Win32_OperatingSystem).InstallDate)
Note: This PowerShell command is from Helge Klein's blog. This output is shown in Figure A from the PowerShell console. Figure A

Click the image to enlarge.

These two tricks will provide you with the final answer for the installation date of that particular installation of Windows.

If you have any tricks to coming up with the answer to this question, share them in the discussion.

Stay on top of the latest Windows Server 2003 and Windows Server 2008 tips and tricks with our free Windows Server newsletter, delivered each Wednesday.

Automatically sign up today!

About

Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.

12 comments
feral
feral

This command works fine at the cmd prompt and with list switch. Try outputting to CSV and it falls over, only returning the first few values and dumps them in the first two rows and nothing else. I have no idea why this happens, going to keep looking for an answer. Keen to see if others here struck the same issue.

rainstone
rainstone

I prefer looking at the "Windows" folder creation date "Date Created" for original Windows server age. Using "systeminfo" only provides me with the latest installed "build" date which is changed by the application of a major service-pack. BTW, even without the "systeminfo" switch, the original install date is displayed but good to know about this swtich.

dlinder
dlinder

"find" is not a standard windows command, but "findstr" is. Also using /c:"Install Date" returns just the information you are looking for. systeminfo | findstr /c:"Install Date" I've used systeminfo for gathering other information, but wasn't aware of the Install Date. Thanks for the tip.

gechurch
gechurch

I just logged into two Windows 2003 servers I administer and checked this. Both are SP2. One returned a date from 2007, and the other a date from 2009. These align with my recollection of when the servers were installed. The one returning 2007 has had SP2 removed and reinstalled within the past two months, so your assertion about service packs changing this date does not seem to be correct.

MaerF0x0
MaerF0x0

Does this take the timestamp from the BIOS or would it be some kind of time taking from a NTP server? I ask because my system is often out of sync, hence the time may be way off.

Lovs2look
Lovs2look

Wow - someones pulling some overtime.

rhino777
rhino777

That's funny...I've been using find since at least the Win9x days...

Answerfactory
Answerfactory

So, which versions of Windows ( say, from 3.0 ) , do not include the "find" command?

rainstone
rainstone

Interesting Link: http://blogs.msdn.com/oldnewthing/archive/2004/09/02/224672.aspx CMOS battery possibly needing to be replaced; Domain users need to login and out to query time-server if one is configured as local time-server; Our time-server inside company in turn queries public atomic-time clock; File creation/modification uses the system time (depending on time-zone settings).

TheSwabbie
TheSwabbie

Me too... I used a similar command back in the days before 9X when Windows 3.1 and 3.0 for Workgroups was king... But, i'm getting so old I cant for the life of me remember what the hell it was :)

robertbrown
robertbrown

But can someone show me how to pipe the output of systeminfo into the findstr command? It is eluding me.

allan_day
allan_day

That command also works in Vista.

Editor's Picks