Using PowerShell to Determine Windows Installation or Upgrade Date
by Mountain Computers Inc, Publication Date: Saturday, March 1, 2025
View Count: 400, Keywords: PowerShell, Microsoft Windows, Installation, Upgrade, Hashtags: #PowerShell #MicrosoftWindows #Installation #Upgrade
There are two things we need sometimes regarding Windows Installations and Upgrades. The date in MM-dd-yyyy format for purposes of reporting. Well, I started with something easy and now I really is might be not so solid since Windows does clean up after itself after a few weeks or month after an upgrade, and the initial installation.
There are two steps; 1) the upgrade, 2) the original installation
Step 1:
For Upgrades, the first 30 or so days, the Windows.old folder will hang around. Use it. Capture its details yet do not rely on it to stay around forever. This works pretty easy for the Windows.Old Folder if it hangs around long enough to be used.
clear
$folderPath = "C:\windows.old"
$folder = Get-Item $folderPath
#$folder.CreationTime
#$folder[0].ToString('MM-dd-yyyy')
$folder[0].CreationTime.ToString('MM-dd-yyyy')
Step 2:
I will get to that shortly, yet the c:\windows\system.ini seems to be an idea for the moment, yet there needs to be something else, like in the Windows registry for Original installation date.
more to come...
if you found this article helpful, consider contributing $10, 20 an Andrew Jackson or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.
© 2025 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.