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
- Windows 10 or Windows 11
- Administrative privileges
- Internet connectivity
- 64GB+ free space on the system drive
- Windows 11 Compatible Machine
Process
The script operates in multiple phases to accomplish the upgrade:
-
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.
-
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.
- Manufacturer-Specific Updates: Installs vendor BIOS, firmware, and driver updates by downloading and running the standardized vendor update scripts for Dell (
-
Upgrade Execution:
- Windows Update Policies: Configures Windows Update policies for feature updates.
- Pre-Update Maintenance: Backs up and restores
dot3svcpolicies, and cleans cached directories (C:\$WINDOWS.~BTandC:\$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.
-
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:
- Primary Task: Initiates the upgrade process.
- 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
- Windows OS Support
- Initialize-DellCommandUpdate
- Initialize-HPImageAssistant
- Install-LenovoUpdates
- Install-WindowsUpdates
- Invoke-WingetProcessor
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), andInstall-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
-NoRebootparameter. 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
- Implemented logic to backup and restore
dot3svcpolicies. - Reference: https://cyberpress.org/windows-11-upgrade-from-23h2-to-25h2-reportedly-disrupts-internet-access
- Added a routine to clean up cached installation directories (
C:\$WINDOWS.~BTandC:\$GetCurrent) before initiating the Windows Update Assistant to prevent corrupted file issues.
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
- Added 25H2 to windows-os-support.json https://content.provaltech.com/attachments/windows-os-support.json
2025-09-25
- Removes the existing settings from the following registry keys to avoid conflicts with group policy:
HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdateHKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\CacheSet001\WindowsUpdateHKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\CacheSet002\WindowsUpdate
2025-09-08
- Added
Security Application Guidancesection 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
$NoRebootswitch 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 Windowswill now only be updated if it is already installed; otherwise,Dell Command | Updatewill be used.- The uninstall process for
Dell Command | Updatehas 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
returnstatement 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-WUComponentscommand is now executed in a background job, and the script will wait up to 10 minutes for its completion before proceeding. - The
Restart-Computer -Forcecommand has been replaced withShutdown -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 -Forcecommand to ensure the script doesn't proceed to the next step too soon. - Removed unnecessary
/Scancommands 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
Windows11LatestFeatureUpdatetable if the$workingDirectorydoes 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