It has been always one of the IT practices when upgrading Microsoft Active Directory (AD) servers, to perform a clean installation of newer Microsoft OS and then promoting the server as AD server, do the migration of AD and then upgrade the version of AD on that new host.
However, Microsoft has been promoting in-place upgrade for many years and for situations where you don’t have a spare hardware where you can clean install your new Windows Server 2025 (WS 2025), it would be better doing an in-place upgrade. And in some situations where your it might be just simpler to perform an in-place upgrade. In this post, we’ll see the pros and cons for an in-place upgrade vs clean install, and walk you through the necessary steps of in-place upgrading of WS 2022 to WS 2025.
The Pros and Cons of In-place upgrades
Let’s break down the pros and cons of an in-place upgrade versus a clean install for Windows Server 2025 when dealing with DNS and Microsoft Active Directory roles.
In-Place Upgrade
Pros:
- Retains Settings and Data – Preserves existing system configurations, installed applications, and user data.
- Less Downtime – Faster process compared to a clean install, resulting in minimal service interruptions.
- Simpler Process – Usually requires fewer steps and is less complex.
- Reduced Compatibility Issues – Existing applications and services remain operational after the upgrade.
Cons:
- Legacy Issues – May transfer lingering issues, junk files, and registry bloat from the old system.
- Compatibility Check Needed – Requires thorough compatibility checks before upgrading since some applications may not work with the new OS.
- Risk of Failure – If the upgrade process fails, it could result in system instability or data loss.
Clean Install
Pros:
- Clean Slate – Ensures a fresh start, eliminating any previous system issues or misconfigurations.
- Optimal Performance – Often results in a more stable and faster system since it removes all outdated files and settings.
- No Legacy Problems – Old and potentially problematic files and registry entries are wiped away.
Cons:
- Time-Consuming – It takes more time as you need to back up data, reinstall the OS, reconfigure settings, and reinstall applications.
- Potential Downtime – Longer process may lead to more downtime.
- Complexity – More complex than an in-place upgrade and requires thorough planning.
In our lab, we’re upgrading our domain controller (DC) which runs on WS 2022.
Before upgrade checks
Now you can check this link at Microsoft site where you’ll find your old OS and a possibility of upgrade to WS 2025. Before an in-place upgrade you should also check with your hardware manufacturer and see whether the upgrade will work (if you are installing on bare metal). If your server is not bare metal, but runs as a VM in your local datacenter, simply perform a regular backup in case you want to roll back. If you’re running on bare metal and want to backup your server before trying to upgrade, you should run your favorite backup program and save to image file (Acronis, Veeam Agent for Windows etc….).
Note: You cannot use evaluation version of Microsoft WS 2025 for the upgrade as this version does not allow you to keep your files, settings and apps.
Quote from Microsoft
You’ll need to have the setup media for the version of Windows Server that you want to upgrade to. Setup media for the target version of Windows Server can be obtained from OEM, Retail, Visual Studio Subscriptions, and the Volume Licensing Service Center (VLSC) channels.
Before Upgrade tasks
Before you mount the ISO and start the upgrade by executing the update.exe file, you have to perform some checks and execute commands to prepare your Microsoft Forest and AD. Nothing really difficult, but it has to be done before. Here is what Microsoft recommends:
- Review Microsoft server applications compatibility.
- Review any third-party application vendor support requirements.
- Make sure your computer:
- Meets or exceeds the hardware requirements for Windows Server.
- Isn’t running in Azure.
Open PowerShell admin command prompt and run:
Get-WindowsFeature
To see which roles and features are installed on the host.
Run Forestprep and Adprep commands first
Those two commands needs to be run before starting the upgrade process on your first DC (if your environment has more than 1 DC).
Note: Yes, you should only run this on the first DC you’re upgrading. Not each time on each of your hosts you’re upgrading.
Mount the ISO of the WS 2024 and via elevated command prompt navigate to this directory:
D:\support\adprep
Note: I’m assuming the CD-rom drive is “D”
There you should find an executable called adprep.exe which we’ll be using to upgrade your forest and AD.
Type this:
.\adprep.exe /forestprep
You’re informed that you’re about to upgrade the schema for the AD forest and that this operation cannot be reversed.
Confirm by typing C and press ENTER.
If no errors, run also:
.\adprep.exe domainprep
You should see successful confirmation.
In-place upgrade of WS 2022 to WS 2025
Mount the ISO and execute the setup.exe file that lays in the root directory of the ISO.
Follow the assistant. You can just click NEXT and in this case the updates are searched and downloaded. If you don’t want to do that, click on the link called “Change how Setup downloads updates” and you’ll have an option not do proceed with downloads of any updates now.
Pick the version you want to upgrade to. In my case I have picked the Datacenter eval with Desktop Experience.
Accept the EULA and select the radio button saying “Keep files, settings, and apps”. Pretty straight forward if you ask me. Nobody would want to keep nothing (the other option), right?
A nice recap screen and we are ready to go.
The system will perform the upgrade during the necessary time, which can vary. Depending the size of the AD, the number of other roles and applications installed, and also depending of the hardware performance of the system which you’re upgrading.
And you’ll see other messages after reboot. The system reboots several times during the whole process.
But then at the end, all went well.
Post Upgrade tasks
You should check your AD structure and also check the logs whether the system is not running into any issues related to the upgrade. Check event viewer logs for System and Application and Services logs.
You could also use DCDIAG utility to test for specific functions of your domain controller. When you use the dcdiag command line tool, you’re essentially running a series of tests to diagnose the health and functionality of your domain controllers.
Some of the key things you would verify with dcdiag include:
- DNS Functionality: Ensures your domain controller can be located in DNS, and that DNS is functioning properly.
- Replication: Checks the replication health between domain controllers to ensure directory data is being properly synchronized.
- Connectivity: Verifies that the domain controller responds to ICMP pings and allows LDAP connections.
- Roles and Services: Confirms the status and proper functioning of essential services and roles like FSMO (Flexible Single Master Operations).
- The detailed write-up about DCDIAG is outside of scope for this post.
You can check your DNS with:
Dcdiag /test:dns
Final Words
Performing an in-place upgrade for Microsoft Windows Server 2025 is an efficient way to transition to the latest version while preserving your current configurations, applications, and data. By following the outlined steps and best practices, you can minimize downtime and ensure a smooth upgrade process. Remember, thorough preparation and planning are key to a successful upgrade. Keep your system updated and take advantage of the new features and improvements that Windows Server 2025 has to offer.
An in-place upgrade is convenient if time and resource constraints are a priority and there are no major issues with the current system. If you know that the host has had some problems before, like a virus or system files corruption, the best is to do a clean installation with reconfiguration.
On the other hand, a clean install is ideal for ensuring a stable and optimized environment, especially if the current system has accumulated significant issues or requires a fresh start with the latest features. Happy upgrading!