Windows 11 Update Script

Hi Community Members,

Microsoft recently announced that Windows 10 will reach the end of support on October 14, 2025. Technical assistance, feature updates, and most importantly, security updates will no longer be provided.

There is an older on-going thread about Windows 11 updates here. To save folks some reading here is the info and scripts I worked on and posted about last Nov 2024. Links the community library are below, as well as the actual PowerShell code


FAQs

1. Does a user need to log in to update to Windows 11?

The script successfully updated test machines to Windows 11 both with a User logged in and without anyone logged in. You can run the update to win11 script remotely.

2. What happens if I run the script on a computer that is not hardware compatible with Windows 11.

In testing, the script still runs the Windows 11 installation and attempts the upgrade, but reboots back to Windows 10 login screen

3. Can I run the Win 11 Update script without running the “Update Assistance” first?

In testing, it worked without having to deal with the update assistance precheck.

Download and Run Windows 11 Installation Assistant - downloads and runs the Windows 11 Installation Assistant program from Microsoft. Please read the full comment block to understand how it works. The TLDR is the script will download and run the installation assistant regardless of the machine’s compatibility and involves potential reboots.

If you want to check first if the machine is compatibility with Windows 11 you can use the following:

Windows 11 Readiness Check - Checks for Microsoft’s standard requirements for Upgrading a machine to Windows 11:

  • Architecture Type
  • Screen Resolution
  • Core Count
  • Clock Speed
  • Total Memory
  • Secure Boot
  • Fixed Disks
  • TPM Version

and the script will write to an asset custom field for your Syncro device if a machine is ready for the upgrade or failed one of the checks.

Here is the generic powershell script that will download and run the windows 11 updater. The few machines I tried it on, I didnt have to deal with the update assistance.


Windows 11 Update PowerShell Script:

<#
This powershell script will download and run the Windows 11 Installation Assistant program from Microsoft. 

If the computer meets the requirements for the Windows 11 update, after the Installation Assistant runs the machine will
automatically reboot and load Windows 11. If for some reason the machine does not meet all the requirements the script
will still download and run the Installation Assistant, which will still attempt the update but fail and reboot back
into Windows 10.

Microsoft requirements can be found here:  https://www.microsoft.com/en-US/windows/windows-11-specifications
#>

$WebClient = New-Object System.Net.WebClient

# URL to Windows 11 Update Assistant
$Win11UpgradeURL = "https://go.microsoft.com/fwlink/?linkid=2171764"
$UpgradePath = "$env:TEMP\Windows11InstallationAssistant.exe"
$WebClient.DownloadFile($Win11UpgradeURL, $UpgradePath)

Start-Process -FilePath $UpgradePath -ArgumentList "/Install  /MinimizeToTaskBar /QuietInstall /SkipEULA"

This has worked for me with Users Logged into the machines or not logged into the machine. If someone is logged in here is what shows on the desktop:

win11

If the script is run on a machine that is not compatible the update is still attempted but the machine will just reboot back to the Windows 10 screen.

:backhand_index_pointing_right: If you need to update an already existing Windows 11 machine to 24H2 you can review this post here

2 Likes

I have tried to run this on 2 systems that are logged in with a user but it never has anything pop up on the screen, there is nothing in the output, and it never upgrades. Any suggestions?

I set the script to run as system and only copied the script provided into the script. Do I need to add anything else like something to support the script provided?

If it fails it is likely a compliance issue and we have found free space (>20 - 25%) being the most common with AV block probably being the second most common.

Running it interactively after maybe running the readiness checker to see if anything obvious has been missed.

I just wanted to provide an update. It looks like either it never showed anything interactive in the user screen or it took many hours because after letting it sit overnight both systems did upgrade. So I guess just set it an forget it and come back many hours later to see if it updated.

1 Like

yeah we have seen that as well and it has been the laptops and remote users where it is much harder to track. I looked in the logs and the areas the update process works but could not get a clean way for it to report back on things.

We ended up doing a run, create a ticket for it, and check back on day +1 for most but laptops and queries just give it a day or so. The last 5% were the usual ones that you had to jump onto and do manually.

Finally got around to finishing up and posting a new version of my upgrade script. Cleaned out all the Windows 10 code. Various notes on possible upgrade issues and how to find the source. Will update again once 25H2 comes out. Changelog:

2.0 / 2025-08-16 - Initial release of Windows 11 only version
    Added - Check for client OS name so upgrade is not attempted on servers
    Added - Variable for setting number of days for upgrade uninstall window
    Changed - $DiskSpaceRequired to 40GB, this seems sufficient for all 10 to 11 upgrades, you might be able to get by with 30ish depending on the machine
    Changed - Bypass Windows metered connection restriction by adding '-TransferPolicy Unrestricted' to Start-BitsTransfer in Get-Download function
    Fixed - Remove ProductVersion registry setting along with TargetRelease/Version (optional)
    Fixed - Use -ErrorAction SilentlyContinue on Get-ItemProperty for TargetReleaseVersion removal to avoid error if not present
2 Likes