Upgrade Server 2012 (In Place)

Upgrade Server 2012 KB ID 0001802

Server 2012 End Of Life

Windows Server 2012 (and Windows Server 2012 R2) will go end of life on October 10th 2023. Start planning to migrate your productions workloads off this platform as soon as you can.

I’ve mentioned before on the site, I’m not a fan of ‘in place’ upgrades, you get to migrate all the ‘broken bits’ (that you didn’t realise were broken), and if the process goes wrong, best case scenario is you are going to be restoring from backup.

What can I upgrade to? Well essentially, your target is to upgrade to Server 2019 , (not Server 2022 that’s not supported).

Upgrade Server 2012 Paths

Upgrade Server 2012 Pre Requisites

Licenses: Just because you’re legally running Server 2012 does not mean you can upgrade to Server 2019, unless you have  software assurance. If you’re wondering if you have software assurance you probably do not (typically you buy it on a three year deal with the option to extend it to five years, and it’s VERY expensive). So if you dont know, you probably DONT have the software assurance. So you will need to purchase a new agreement, or buy new retail copies of Server 2019.

You will require a Windows Key for the new server (or KMS services setting up that will allocate a Server 2019 key to the newly upgraded server.)

CALs/SALs (Chances are you WONT have SALs, but if you do then speak to your MSP). You will need the correct amount of user/device CALS for server 2019 before you start your upgrade.

Backup Support: Does your backup solution support server 2019? 

Application Support: Does your AV Software, Endpoint protection solution, or Managed Detection and Response system support Server 2019? Make sure you check this list for Microsoft application support, and ensure any third party applications are supported with the vendor.*

*I cannot stress this enough, I work for a major MSP, and most clients are astounded when we wont simply upgrade their old server(s) from 2012, because we simply cannot guarantee that THEIR applications will work successfully on a newer version of Windows Server.

Hardware Support: Most servers are virtual these days, so this is less of an issue, but the machine/VM being upgraded needs to meet the minimum hardware requirements for server 2019.

Updates: MAKE SURE your existing 2012 server is up to date, (and the applications are patched as much as possible!)

Upgrade 2012 updates

Maintenance Window: During the upgrade the server will be offline to users, this will be for as long as a normal OS install, but you will need to plan in additional time for testing applications (post OS upgrade), then programming in any maintenance timings, and arranging and planning any CAB.

Snapshot: If you’re running in a virtual environment, then carry out a snapshot, (or Checkpoint if you are running Hyper-V).

Upgrade Server 2012 Snapshot

Backup: Before even entertaining the idea of updating the server, make sure you have a good backup. I would make sure I could restore from backup successfully before even attempting an in place upgrade on a production server running 2012/2012R2. In fact if your risk averse, upgrade the restored server itself!

Upgrade Server 2012 Backup

WARNING: Make sure the media you use to upgrade is up to date. While Windows server has a mainstream support date of 9th January 2024, some earlier versions may not be supported. ENSURE you are using build number 1809 Long-Term Servicing Channel (LTSC) or newer.

If you are in doubt about any role or application that may not work (post in place upgrade), then clone your machine, and test the upgrade on an isolated network to test the procedure beforehand.

Upgrade Server 2012 (Domain Controllers)

Other posts say this is not possible, but that is not true, (with some caveats). But it’s so much easier to build a new member server with server 2019/2022 and then extend the forest and domain, promote the new server to be a DC, and demote the old server(s). 

If you attempt to in place upgrade a 2012 server Windows MAY stop an in place upgrade with the following error;

Upgrade Server 2012 Forestprep error

Active Directory on this server does not contain Windows Server ADPREP / FORESTPREP updates.

Which makes sense (if you’ve ever done any domain upgrades or migrations). Before a 2019 DC can be introduced into a domain the forest and domain need to be prepared, (the schema extended). You can either (on this or another DC) run adprep.exe / forestprep and adprep.exe /domainprep from the 2019 install media (look in the support/adprep folder).  

Note: Make sure you’re logged in as a member of the schema admins group!

Obviously if you’ve already ran forest prep and adprep and already have 2019 domain controllers this error will not appear and the server will simply update.

Upgrade Server 2012 (Exchange Server)

NO ! Just don’t do this. Exchange on-premises is designed to be ‘swing migrated‘ to a newer version. If you need to do this then PeteNetLive is littered with upgrade run through even if you are on older versions of Exchange.

Migrate Exchange 2010 to Exchange 2016 (& 2013)

Exchange 2019 Migration from Exchange 2016 (&2013)

Upgrade Server 2012 (SQL Server)

We are in murky waters here! Server 2019 (at time of writing) does not support anything OLDER than SQL 2014. So you may need to upgrade your SQL instances before you consider upgrading the OS. Every single time I’ve ever replaced a SQL server (and I’ve been doing this for over 20 years now) I’ve built a new one, migrated the databases and then the application vendor has installed ‘whatever‘ application or website that required the database.

Also Server 2019/2022 have particular SQL CU level requirements!

If some SQL Jedi walks in here I’d welcome any comments below. But for me it’s a No!

Upgrade Server 2012 / 2012 R2 to Server 2019 (In Place)

By this point you’re adamant you DON’T want to build a new server and migrate your apps and data, and you’ve understood all the pre-requisites and warnings above.

Before starting, Microsoft recommend that you gather some information, run the following commands and take the information dumped into text files and put them safely elsewhere.

Systeminfo.exe >> SystemInfo.txt
ipconfig /all >> IPConfig

2012 Server Systeminfo.

Then take a copy of the contents of the following two registry values;

HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\BuildLabEx

HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EditionID

2012 Server Registry Keys

Note: I lost the will to live trying to work out how to dump those two values into a text file with PowerShell 5.1 (there’s a challenge for you!)

Present the Server 2019 Install to your 2012 server, locate and run setup.exe.

Update Server 2012 to 2019

It will ask to check for update let it do so  > Next.

Upgrade Server 2012 to 2019

If you are installing a ‘retail’ version of Windows server, at this point it will ask of the licence key > 

Server 2019 License Key

Call me an  old traditionalist, I require a graphical user interface > Next.

2019 Graphical interface

I believe that someone at Microsoft should be made to read one of these out loud for EVERY copy of Windows it sells, seriously they could put anything in here. Now that your firstborns soul belongs to Microsoft > Accept.

Server EULA

The whole point is to retain our data! > Next.

Server 2019 License upgrade path

It will now run through its pre-flight checks, pull down any updates and make sure it’s happy. When finished it will warn you if there’s any potential problems. Here it’s complaining about my monitor driver, (probably because it’s using the Window update download one, and not the VMware tools one to be fair). I know this wont cause me any problems, I can click Confirm > 

Server 2019 Upgrade needs your attention

Last chance to bail out! Install.

Server 2019 In place upgrade

One hour and twenty five minutes later,

Server 2019 In place upgraded

In Place Upgrade of Server 2012 Running Certificate Services

Can you do this? Yes – Even if you have a multi-tier PKI deployment. see here

 

Related Articles, References, Credits, or External Links

In Place Upgrade Windows 2016 to Windows 2019

Author: PeteLong

Share This Post On

2 Comments

  1. Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\’ -Name @(‘BuildLabEx’,’EditionID’) | select BuildLabEx,EditionID | out-file [path to your output file]

    Post a Reply
    • You may also wish to capture “netsh dump”.
      I have succeeded in going from 2012R2 straight to 2022 in one hop with no issues.
      If connected to the web, do allow patch during install.
      If offline, patch to current SSU + Dotnet rollup + OS rollup then do not allow patch during install.

      Post a Reply

Leave a Reply to Alistair Cancel reply

Your email address will not be published. Required fields are marked *