大网数据广告活动
安装更新与部署

Upgrade Windows Server in Place

· 52CE 我爱测

Learn how to upgrade Windows Server in place using installation media or Windows Update. Keep settings, server roles, and data intact.

An in-place upgrade moves your server from an older version of Windows Server to a newer version while keeping your settings, server roles, and data intact. For example, you can upgrade from Windows Server 2012 R2 to Windows Server 2025. When you upgrade in place, your environment stays running on a supported version with the latest security and performance features, all without rebuilding.

This article shows you how to upgrade by using Windows Server Setup from installation media or the feature update in Windows Update.

Prerequisites

Important: Don't use in-place upgrade for servers that run Active Directory Domain Services (AD DS). Although an in-place upgrade is technically possible, it doesn't deliver the AD performance and feature improvements included in Windows Server 2025 and later. Instead, use a clean OS install to promote new domain controllers and demote the older ones. For more information, see Upgrade domain controllers to a newer version of Windows Server.

Depending on whether you upgrade by using installation media or Windows Update, you need to meet additional prerequisites. Select the tab for your upgrade method:

Installation media

The installation media upgrade method applies to non-Azure servers only. To upgrade Windows Server in an Azure virtual machine (VM), see In-place upgrade for VMs running Windows Server in Azure or use the Windows Update method.

  • Installation media (ISO image, USB drive, or DVD) for the version of Windows Server that you want to upgrade to.

  • You can get installation media for your target version of Windows Server from an original equipment manufacturer (OEM), a retail distribution channel, a Visual Studio subscription, or the Microsoft 365 admin center.

Windows Update

To upgrade to Windows Server 2025 or later by using Windows Update, you need:


Collect pre-upgrade diagnostic information

Collect diagnostic information from your server before upgrading in case the upgrade fails. Store the diagnostic files where you can access them if your server goes down.

To collect your information:

  1. Open an elevated PowerShell prompt, make a note of your current directory, and run the following commands:

    Get-ComputerInfo -Property WindowsBuildLabEx,WindowsEditionID | Out-File -FilePath .\computerinfo.txt
    systeminfo.exe | Out-File -FilePath systeminfo.txt
    ipconfig /all | Out-File -FilePath ipconfig.txt
    

    The Get-ComputerInfo command requires PowerShell 5.1 or later. If your Windows Server version doesn't include PowerShell 5.1, open Registry Editor and find the BuildLabEx and EditionID values under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion.

  2. Open File Explorer, go to the directory you noted, and copy the files to a USB flash drive or network location off your computer.

Back up your server operating system, apps, and VMs after collecting your system information. Shut down or migrate any VMs currently running on the server. Make sure no VMs are running during the upgrade.

Perform the in-place upgrade

You can perform the in-place upgrade by using installation media or Windows Update. Select the tab for your upgrade method:

Installation media

Tip: Looking for a way to upgrade without installation media? Use the Windows Update tab to upgrade without needing installation media.

Run Windows Server Setup from your installation media to do the in-place upgrade. This procedure applies to non-Azure, nonclustered servers running Windows Server 2012 R2 or later. During the upgrade, your server restarts several times.

To do the in-place upgrade by using installation media:

  1. Mount or insert the installation media. Open File Explorer, go to the root of the installation media, and then open setup.exe. For example, if you mounted an ISO image or inserted a DVD as drive D, the file path is D:\setup.exe. If User Account Control prompts you to allow Setup to make changes, select Yes.

  2. By default, Setup automatically downloads updates for the installation. If you're okay with the default settings, select Next to continue.

    If you don't want Setup to automatically download updates, select Change how Setup downloads updates, select the appropriate option for your environment, and then select Next.

  3. If prompted, enter your product key, and then select Next.

  4. Select the edition of Windows Server you want to install, and then select Next.

  5. Review the applicable notices and license terms. If you agree to the terms, select Accept.

  6. Select Keep files, settings, and apps to do an in-place upgrade, and then select Next.

  7. After Setup finishes analyzing your device, it displays the Ready to install screen. To start the in-place upgrade, select Install.

The in-place upgrade starts, and the screen displays the progress. After the in-place upgrade finishes, your server restarts.

Windows Update

Use the Windows Server feature update in Windows Update to perform the in-place upgrade without installation media.

Enable the feature update from Windows Update

Add the following registry value to enable the feature update.

Open an elevated PowerShell prompt and run the following command:

New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AllowWindowsServerFeatureUpdate"
New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AllowWindowsServerFeatureUpdate" -Name "AllowWindowsServerFeatureUpdate" -PropertyType DWord -Value 1

Alternatively, you can set the value manually in Registry Editor:

  1. Open Registry Editor.

  2. Go to HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AllowWindowsServerFeatureUpdate.

  3. Create a new DWORD value named AllowWindowsServerFeatureUpdate and set it to 1.

    :::image type="content" source="media/upgrade-in-place/registry.png" alt-text="Screenshot of Registry Editor showing the AllowWindowsServerFeatureUpdate DWORD value set to 1 under the WindowsUpdate key.":::

Upgrade by using Windows Update

When you meet all the prerequisites and see the Windows Server feature update in Windows Update, proceed with the in-place upgrade.

  1. Open Settings, and then select Windows Update. Verify that the feature update offer banner is visible.

    :::image type="content" source="media/upgrade-in-place/windows-update-feature-update.png" alt-text="Screenshot of the Windows Update settings page showing the Windows Server 2025 feature update available with a Download and install link.":::

  2. Select Download and Install to begin the feature update process.

  3. Review the Important Information for pricing, best practices, licenses, and privacy.

  4. Select Accept and install to proceed with the download and installation of the feature update.

  5. Wait for the feature update to download and install. Your server restarts during the installation.

Tip: The feature update is also available for Server Core installations. Use SConfig option 6 to search for and install the feature update. For more information, see Configure Windows Server Core Windows Update.


Verify the in-place upgrade

After the server restarts, verify the upgrade succeeded by checking the Windows Server version and testing your applications.

  1. Open an elevated PowerShell prompt. Run the following command to verify that the version and edition match what you expected.

    Get-ComputerInfo -Property WindowsProductName
    
  2. Ensure all applications are running and client connections are successful.

If your server isn't working as expected after the in-place upgrade, analyze the Setup log files in the C:\Windows\Panther directory. Also download the SetupDiag tool to analyze the Setup log files.

If you need technical assistance, contact Microsoft Support.

Related content

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 04/14/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。