Sometimes when you have some inherited Windows / Linux OS servers or Desktops, it is useful to be aware what is the Operating System install date. Usually the install date of the OS is closely to the date of purchase of the system this is especially true for Windows but not necessery true for Liunx based installs.
Knowing the install date is useful especially if you're not sure how outdated is a certain operating system. Knowing how long ago a current installation was performed could give you some hints on whether to create a re-install plans in order to keep system security up2date and could give you an idea whether the system is prone to some common errors of the time of installation or security flaws.
1. Check out how old is Windows install?
Finding out the age of WIndows installation can be performed across almost all NT 4.0 based Windowses and onwards, getting Winblows install date is obtained same way on both Windows XP / Vista/ 7 and 8.
Besides many useful things such as detailed information about the configuration of your PC / notebook systeminfo could also provide you with install date, to do so just run from command line (cmd.exe).
C:\Users\hipo> systeminfo | find /i "install date"
Original Install Date: 09/18/13, 15:23:18 PM
If you need to get the initial Windows system install date however it might be much better to use WMIC command to get the info:
C:\Users\hipo>WMIC OS GET installdate
The only downside of using WMIC as you can see is it provides the Windows OS install date in a raw unparsed format, but for scripters that's great.
2. Check WIndows Installed and Uinstalled software and uptime from command line
One common other thing next to Windows install date is what is the Windows uptime, the easiest way to get that is to run Task Manager in command line run taskmgr
For those who want to get the uptime from windows command line for scripting purposes, this can be done again with systeminfo cmd, i.e.:
C:\> systeminfo | find "System Boot Time:"
System Boot Time: 03/29/16, 08:48:59 AM
Other helpful Windows command liners you might want to find out about is getting all the Uninstalled and Installed programs from command line this again is done with WMIC
C:\> wmic /OUTPUT:my_software.txt product get name
Alternative way to get a full list of installed software on Windows OS is to use Microsoft/SysInternals psinfo command:
C:\> psinfo -s > software.txt
C:\> psinfo -s -c > software.csv
If you need to get a complete list of Uinstalled Software using command line (e.g. for batch scripting) purposes, you can query that from Windows registry, like so:
C:\>reg query HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
Command Output will be something like on below shot:
Well that's all folks 🙂