Skip to main content

Install-Windows11FeatureUpdate

Overview

The script automates the installation of the latest Windows 11 Feature Update. It performs comprehensive pre-checks, OEM update maintenance, and validation to ensure a smooth upgrade process.

The script supports both Windows 10 and Windows 11:

  • For Windows 10, it attempts to upgrade to the latest available version of Windows 11.
  • For Windows 11, it ensures the system is updated to the latest available feature update.

Security Application Guidance

For optimal performance and to minimize potential interference, it is recommended to disable or set any active security applications (such as antivirus, endpoint protection, or EDR tools) to "learning" or "detect-only" mode before executing the script.

This helps ensure that the update process runs smoothly without being blocked or slowed down by real-time protection mechanisms. Once the update is complete, security settings can be reverted to their original state.

Requirements

Process

The script operates in multiple phases to accomplish the upgrade:

  1. System Validation:

    • OS Compatibility: Verifies the system is running Windows 10 or Windows 11.
    • Internet Connectivity: Checks for an active internet connection.
    • Power Status: Ensures laptops are connected to power.
    • Disk Space: Confirms sufficient free space on the system drive (64GB, or 24GB on build 10.0.26100 or newer).
    • Hardware Readiness: Uses Microsoft's HardwareReadiness script to check TPM 2.0, Secure Boot, and other system requirements.
    • Windows Update Health: Validates Windows Update health and repairs system files via SFC/DISM.
  2. OEM Update Maintenance:

    • Manufacturer-Specific Updates: Installs vendor BIOS, firmware, and driver updates by downloading and running the standardized vendor update scripts for Dell (Initialize-DellCommandUpdate.ps1), HP (Initialize-HPImageAssistant.ps1), and Lenovo (Install-LenovoUpdates.ps1).
    • Generic Updates: Uses Install-WindowsUpdates.ps1 (Drivers and Tools categories) for other manufacturers.
    • Controlled Reboots: After each OEM update pass, the script checks whether a restart is required before continuing.
  3. Upgrade Execution:

    • Windows Update Policies: Configures Windows Update policies for feature updates.
    • Pre-Update Maintenance: Backs up and restores dot3svc policies, and cleans cached directories (C:\$WINDOWS.~BT and C:\$GetCurrent) to prevent corrupted file issues before initiating the update assistant.
    • BitLocker Handling: Suspends BitLocker protection on the system drive (when it is enabled) before launching the Installation Assistant, so the multi-reboot upgrade does not prompt for the recovery key.
    • Installation Assistant: Downloads and runs the Windows 11 Installation Assistant via scheduled tasks.
  4. Post-Install Validation:

    • SetupDiag Analysis: Uses Microsoft SetupDiag to analyze installation success or failure.
    • Cleanup: Performs automatic cleanup and logs results.

The script also schedules tasks to run itself after restarting the system to complete the upgrade process. It creates two scheduled tasks:

  1. Primary Task: Initiates the upgrade process.
  2. Post-Reboot Task: Resumes the upgrade process after restarting the system.

Points Where the Computer Can Be Restarted

  • OEM Updates: If OEM updates require a reboot, the script will restart the computer. The computer might be restarted multiple times during the OEM update phase.
  • System Health Check: The script will reboot the computer following the Health Check Scan and Repair process.
  • Primary Task Execution: After initiating the upgrade process, the script may restart the computer to complete the installation. The computer can be restarted multiple times during the upgrade process.

Payload Usage

To execute the script, use the following command:

.\Install-Windows11FeatureUpdate.ps1

The script takes no parameters and always restarts the computer automatically when a reboot is required.

Parameters

This script does not accept any parameters.

Output

The script generates the following output files:

  • .\Install-Windows11FeatureUpdate-log.txt
  • .\Install-Windows11FeatureUpdate-Error.txt

Cautions

  • The machine may restart up to 7 times to complete the upgrade process.
  • Be aware of known issues with the feature update 24H2 before using the script.
  • The computer can restart at various points due to firmware, BIOS, driver updates, or the feature update itself.

Dependencies

Changelog

2026-07-09

  • Replaced the legacy per-vendor OEM update logic with a standardized approach that downloads and runs the dedicated vendor update scripts: Initialize-DellCommandUpdate.ps1 (Dell), Initialize-HPImageAssistant.ps1 (HP), Install-LenovoUpdates.ps1 (Lenovo), and Install-WindowsUpdates.ps1 (Drivers and Tools categories) for other manufacturers.
  • Added a BitLocker suspend step before launching the Windows Installation Assistant, so the multi-reboot upgrade does not prompt for the BitLocker recovery key on encrypted devices.
  • Removed the -NoReboot parameter. The script now always restarts the computer automatically when a reboot is required.
  • Internal maintenance: refactored the reboot-pending detection and stored-state handling into reusable helpers, standardized all commands to use full parameter names, and switched to single-quoted strings with composite formatting.

2026-03-20

  • Added support for the Windows PC Health Check application in Dutch, identified as Windows pc-statuscontrole.

2026-03-12

2026-03-06

  • Modified the drive space check logic to use version-specific requirements.
  • Machines on build 10.0.26100 (Windows 11 24H2) or newer require 24GB of free space.
  • Machines on builds older than 10.0.26100 continue to require 64GB of free space.

2025-10-10

2025-09-25

  • Removes the existing settings from the following registry keys to avoid conflicts with group policy:
  • HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
  • HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\CacheSet001\WindowsUpdate
  • HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\CacheSet002\WindowsUpdate

2025-09-08

  • Added Security Application Guidance section in the document.

2025-07-31

  • The script will attempt to set the 'TrustedInstaller' service (Windows Modules Installer) to Automatic startup and ensure it is running before starting the upgrade process.
  • This change addresses upgrade failures caused by error code 0x8007001F.

2025-07-15

  • The script no longer forces a restart after the primary process finishes; instead, it allows the computer to restart on its own as needed.
  • If the system does not restart within one hour, the script will run the SetupDiag tool to check for any errors.
  • If SetupDiag indicates that a reboot is required to complete the upgrade and the $NoReboot switch is not used, the computer will be forcefully restarted.

2025-07-10

  • If the vendor tool fails to install driver updates, the script will attempt to install drivers using Windows Update.
  • The script will proceed to run the Windows 11 Installer even if troubleshooting steps do not

2025-07-03

  • Dell Command | Update Universal for Windows will now only be updated if it is already installed; otherwise, Dell Command | Update will be used.
  • The uninstall process for Dell Command | Update has been removed. Winget will now update the application in place if an older version is detected, without uninstalling it first.
  • Firmware and BIOS update logic for Dell machines has been removed.
  • Removed unnecessary return statement from the Dell drivers installation section.
  • Driver updates will no longer be attempted after every reboot if they have already been completed.
  • Initial verification, registry updates, and Windows Update reset will not be repeated after every reboot if they have already been performed.
  • The Reset-WUComponents command is now executed in a background job, and the script will wait up to 10 minutes for its completion before proceeding.
  • The Restart-Computer -Force command has been replaced with Shutdown -f -r -t 10.
  • The sleep time after issuing a restart command has been reduced to 10 seconds.

2025-05-07

  • Added a 60-second delay after the Restart-Computer -Force command to ensure the script doesn't proceed to the next step too soon.
  • Removed unnecessary /Scan commands from the Dell Command Update section.
  • Modified the handling of exit codes 3000 and 3005 in Dell Command Update to generate warnings instead.
  • Added a check to limit driver update attempts to a maximum of three times or three reboots.
  • Included a check to reset the Windows11LatestFeatureUpdate table if the $workingDirectory does not exist. This indicates that the script might have previously executed but failed, and if someone is trying to re-run it, they just need to remove the $workingDirectory.

2025-04-10

  • Initial version of the document