Force Allowing Windows 11 Upgrade on Unsupported Machines

Detailed instructions on how to force a machine running Windows 10 to upgrade to Windows 11

Disclaimer

Running Windows 11 on hardware not officially supported by Microsoft is risky and not advisable. This guide is meant to be informational only, and is provided as-is with no express or implied warranty. Even if this process works for the initial upgrade, expect system instability, update failure or machine failure in the future.

Credit

The powershell script used here was initially published on GitHub by asheroto at (asheroto-github)

Script Setup

First, you must save the following script. Here I have named it Windows11-Enable-Upgrade.ps1 and will use that name in this guide, though you may name it anything so long as the extension is .ps1. Save this below and place the file on the machine in need of an upgrade. You may right click this link (Windows11-Enable-Upgrade.ps1) and select save as, or simply copy and paste the source code below.

<#
.SYNOPSIS
Bypasses Windows 11 hardware requirements for in-place upgrades.

.DESCRIPTION
This script modifies specific registry values to override system compatibility checks performed during
Windows 11 upgrades. It removes legacy upgrade failure entries, simulates compatible hardware state,
enables Microsoft's documented bypass policy for unsupported TPM or CPU configurations, and sets the
UpgradeEligibility flag required by the Windows 11 Upgrade Assistant.

This is intended for lab, evaluation, or controlled environments where hardware policy allows.

.NOTES
Author: asheroto
Source: https://gist.github.com/asheroto/5087d2a38b311b0c92be2a4f23f92d3e
Required: Run as Administrator

.LICENSE
Use at your own risk. No warranty expressed or implied.
#>

function Write-Section {
<#
.SYNOPSIS
Displays a section header with borders using Write-Host and optional color.

.DESCRIPTION
Prints multi-line text surrounded by a hash border for readability.
Supports output coloring via the Color parameter.

.PARAMETER Text
The text to display. Can include multiple lines.

.PARAMETER Color
(Optional) The color to use for the text and border. Defaults to White.

.EXAMPLE
Write-Section -Text "Starting Process"

.EXAMPLE
Write-Section -Text "Line 1`nLine 2" -Color Green
#>
    param (
        [Parameter(Mandatory)]
        [string]$Text,

        [string]$Color = "White"
    )

    $lines = $Text -split "`n"
    $maxLength = ($lines | Measure-Object -Property Length -Maximum).Maximum
    $border = "#" * ($maxLength + 4)

    Write-Host ""
    Write-Host $border -ForegroundColor $Color
    foreach ($line in $lines) {
        Write-Host ("# " + $line.PadRight($maxLength) + " #") -ForegroundColor $Color
    }
    Write-Host $border -ForegroundColor $Color
    Write-Host ""
}

function Set-RegistryValueForced {
    <#
.SYNOPSIS
Adds or updates a registry value with error handling.

.DESCRIPTION
Creates the specified registry key if it does not exist and sets the provided value.
Supports String, DWord, QWord, Binary, and MultiString types.
Outputs an error message if the operation fails.

.PARAMETER Path
The full registry path (e.g., HKLM:\Software\Example).

.PARAMETER Name
The name of the registry value to create or update.

.PARAMETER Type
The type of the registry value (String, DWord, QWord, Binary, MultiString).

.PARAMETER Value
The value to set. For MultiString, provide an array of strings.

.EXAMPLE
Set-RegistryValueForced -Path "HKLM:\Software\Test" -Name "TestValue" -Type String -Value "OK"

.EXAMPLE
Set-RegistryValueForced -Path "HKLM:\Software\Test" -Name "Flags" -Type DWord -Value 1
#>

    param (
        [string]$Path,
        [string]$Name,
        [string]$Type,
        [object]$Value
    )

    try {
        # Ensure the key exists
        if (-not (Test-Path -Path $Path)) {
            New-Item -Path $Path -Force | Out-Null
        }

        # Set the registry value
        Set-ItemProperty -Path $Path -Name $Name -Value $Value -Type $Type -Force
    } catch {
        Write-Output "Failed to set $Name in ${Path}: $($_.Exception.Message)"
    }
}

# Step 1: Clear old upgrade failure records
Write-Host "Step 1: Clearing old upgrade failure records..." -ForegroundColor Yellow
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\CompatMarkers" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Shared" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\TargetVersionUpgradeExperienceIndicators" -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "Cleanup complete." -ForegroundColor Green

# Step 2: Simulating hardware compatibility
Write-Host "Step 2: Simulating hardware compatibility..." -ForegroundColor Yellow
Set-RegistryValueForced -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\HwReqChk" -Name "HwReqChkVars" -Type MultiString -Value @(
    "SQ_SecureBootCapable=TRUE",
    "SQ_SecureBootEnabled=TRUE",
    "SQ_TpmVersion=2",
    "SQ_RamMB=8192"
)
Write-Host "Hardware compatibility values applied." -ForegroundColor Green

# Step 3: Allow upgrades on unsupported TPM or CPU
Write-Host "Step 3: Allowing upgrades on unsupported TPM or CPU..." -ForegroundColor Yellow
Set-RegistryValueForced -Path "HKLM:\SYSTEM\Setup\MoSetup" -Name "AllowUpgradesWithUnsupportedTPMOrCPU" -Type DWord -Value 1
Write-Host "Upgrade policy for unsupported hardware enabled." -ForegroundColor Green

# Step 4: Set Upgrade Eligibility flag in HKCU
Write-Host "Step 4: Setting upgrade eligibility flag..." -ForegroundColor Yellow
Set-RegistryValueForced -Path "HKCU:\Software\Microsoft\PCHC" -Name "UpgradeEligibility" -Type DWord -Value 1
Write-Host "Eligibility flag set." -ForegroundColor Green

# Done
Write-Section -Text "All operations completed successfully!`nYou can now upgrade using the Windows 11 Upgrade Assistant or setup.exe from installation media.`nNo restart required." -Color Cyan

Installation instructions

I have found it easiest to save the file on the root directory of the C drive at C:\Windows11-Enable-Upgrade.ps1 If you have not saved it here, please make note of the directory in which you have saved it instead.

  1. Open Powershell as an Administrator (explained below)

1.1. Open the start menu and begin typing powershell

1.2. Right-click the Powershell icon and select Run as Administrator

1.3. When the User Account Control (UAC) dialogue pops up requesting permission to run as an administrator Do you want to allow this app to make changes to your device? select Yes

  1. In powershell, type the following command:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

2.1. You may be prompted to accept the change, press y to confirm

  1. In Powershell, change directories to wherever you saved the file. By default, Powershell on Windows opens at
C:\WINDOWS\system32

3.1. If you put the file in the root C directory, you can simply run the command

cd C:\

and press enter to move into the root of the C directory.

3.2. If you put the file somewhere else, such as on the desktop, you may need to specify the complete path. For example,

cd C:\Users\YourUsernameHere\Desktop

or, if using OneDrive,

cd C:\Users\YourUsernameHere\OneDrive\Desktop

3.3. If you choose to leave the file on a USB drive (your mileage may vary), identify the drive letter (here I will assume the USB drive is the D drive) and change your path to it by running:

D:

Then, if it is in a subdirectory of the D drive, you can use cd as you did before

cd D:\path\to\the\directory\
  1. Once you are in the correct directory, run the
dir

command and search for the name of the Powershell file you saved. In our example, it is Windows11-Enable-Upgrade.ps1 If you see it, you are in the correct directory. If not, you either failed to place the file or are in the wrong directory.

  1. Run the command
.\Windows11-Enable-Upgrade.ps1

and verify that the output indicates success.

Upgrade Instructions

Now that the system is permitted to upgrade, we will use the Windows Installation/Upgrade Assistant to begin the upgrade.

  1. Open a web browser and navigate to (or search for) the Windows 11 Download Page (Windows 11 Downloads)
  2. Locate the Windows 11 Installation Assistant and select the blue 'Download Now' button.
  3. Navigate to your downloads folder and open the newly saved file. Follow the official Microsoft prompts from here to upgrade your PC.