Script to determine if a Windows 2012R2 server was upgraded from a previous ver

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Ed O'Connor Ed O’Connor 9 months, 2 weeks ago.

  • Author
    Posts
  • #35374
    Profile photo of Ed O'Connor
    Ed O’Connor
    Participant

    Hi All,

    I am trying to figure a way to determine if a Windows 2012R2 server was upgraded from a previous version or a clean install. The servers in this environment predate me and there are over 2000 of them. It was reported to me that some local admins are complaining with issues that they attribute to the server being upgraded to 2012R2 instead of being build from scratch.

    I need to find a way to determine if it was a upgrade or clean install, script it to run against all 2012R2 servers, and generate a report to mgmt with the results. I have looked online and do not see anything on how to make this distinction and figured with all the smart people we have in this group someone may have tackled this before.

    Any tips or guidance is greatly appreciated as I can't find much on this topic.

    As always thanks in advance.

    ~Ed

  • #35386
    Profile photo of Yuan Li
    Yuan Li
    Participant

    I think when you do a windows upgrade, it will automatically move all the previous version files to a windows.old folder. So you just test-path c:\windows.old you can determine if was a upgraded version or clean install.

  • #35410
    Profile photo of Ed O'Connor
    Ed O’Connor
    Participant

    Thanks Yuan,

    I did search for the .old folder but I have seen at other places (and one of the other admins here) have said it is quite possible that they deleted that folder after the upgrade. I was hoping someone knew of a reg key or log file somewhere that would definitively say if it was upgraded or not.

    I appreciate your help.

You must be logged in to reply to this topic.