Question

Has any one created a windows 11 22h2 feature update worklet yet?

  • 24 October 2023
  • 14 replies
  • 375 views

Badge

Has anyone created a Windows 11 22h2 feature update worklet?


14 replies

Userlevel 3

Hi @Dbrown74 !

The Worklet named Windows - Configuration - Windows 11 Feature Update in our Catalog will allow you to upgrade a device from Windows 10 to Windows 11.

 

This Worklet will perform an in-place Feature Upgrade to Windows 11 by invoking the Windows Installation Assistant utility silently.  The WIA tool will download the latest available Windows 11 build, which at the time of writing this is 22H2.

 

I hope this helps! Have a great day!

@JohnG-Automox Hey! Does the Windows 11 Feature Update worklet override the “Product Version (Windows 10) and Target Release Version (22H2)” registry keys and begin the Win 11 upgrade on existing Win 10 devices? or should we clear these reg keys beforehand? 

Userlevel 3

Hi @amoxuser,


If you have the Target Release Version registry key in place,  you will need to remove it first before running the worklet.  Else, when the Windows 11 Installation Assistant runs it would deem the device as not compatible.

 

Let me know if you have any other questions!

@JohnG-Automox Thanks! Does Automox have a script or a worklet to remove those specific registry keys for Win 11 readiness?

You should probably tweak the “Windows 11 Feature Update” worklet to check if these keys exist and delete them before running the installation assistant. 

Userlevel 3

Hi @amoxuser,

 

Thanks for the feedback!  We’ll look at adding this as an enhancement to the existing worklet.

 

In the meanwhile, you can use the following worklet to check if the target version registry key is set and then remove them:

Evaluation Code:

# Check the existence of the Target Release Version registry keys
$rPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'
$rVersionKeys = @('TargetReleaseVersion', 'TargetReleaseVersionInfo', 'DisableWUfBSafeguards')
$detected = $false

ForEach ($key in $rVersionKeys)
{
If (Get-ItemProperty -Path $rPath -Name $key -ErrorAction SilentlyContinue)
{
$detected = $true
Break
}
}

If ($detected)
{
Write-Output "Target version keys were found. Flagging for remediation."
Exit 1
}

Else
{
Write-Output "Target version keys were not found. Device is compliant."
Exit 0
}



Remediation Code:

# Remediate by removing Target Release Version registry keys if they exist
$rPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'
$rVersionKeys = @('TargetReleaseVersion', 'TargetReleaseVersionInfo', 'DisableWUfBSafeguards')

ForEach ($key in $rVersionKeys)
{
# Check if the property exists before attempting to remove
If (Get-ItemProperty -Path $rPath -Name $key -ErrorAction SilentlyContinue)
{
# If it exists, remove the property
Remove-ItemProperty -Path $rPath -Name $key
Write-Output "Removed $key from $rPath."
}

Else
{
Write-Output "$key not found at $rPath."
}
}

Write-Output "Device is compliant."
Exit 0


This can be ran as a separate worklet, or if you wanted to consolidate it into the existing Windows 11 Feature Upgrade one, you can add the remediation code here to the beginning of that worklet’s remediation code.  Just remove the Exit 0 line that way the script continues with the Upgrade.

 

Let me know if you have any questions.
Have a great day!

@JohnG-Automox Perfect! Thanks for the worklet. 

Userlevel 1

@JohnG-Automox are there any plans for an Automox supported version to upgrade older feature releases of Windows 11 like 21H2, to 22H2 or later using a similar worklet?

Userlevel 3

Hi  @Edward,

The Windows Installation Assistant will always download the latest available version of Windows 11, so you won’t be able to use that method to push earlier builds like 21H2.


We’ll be releasing a new Windows 11 Feature Update worklet to the Catalog in about a week or so though!

 

This new version will allow you to perform the Windows 11 upgrade via a network share hosted ISO.  With this method, you’d be able to target whatever Windows 11 build you’d like by sourcing the appropriate ISO.

I’ll post a link here when the new worklet goes live.

 

Have a great day!
 

Userlevel 3

Good morning @Dbrown74 and @Edward ,


The new Windows 11 upgrade worklet has been released to the Worklet Catalog:
Windows - Maintenance Tasks - Windows 10 to Windows 11 Upgrade via ISO

 

Please let me know if you have any questions about implementing it.

 

Have a great day!

@JohnG-Automox For the “Windows 11 Feature Update” worklet, should I set the User Notifications to force Automatic Restart or not enable force restart? 

On a Win 10 test PC, when the policy was run for the first time, it immediately prompted me to reboot, which was unexpected. (I set the deferral options and notification settings) I expected the reboot notifications to be shown once the Win 11 package is downloaded and ready to be installed. 

Userlevel 3

Hi @amoxuser !

User notifications and the restart action is driven through the Windows Installation Assistant natively. You should therefore turn off the Automox restart and notification settings:

 

 

The final restart notification will look like the following:

 

 

Let me know if you have any other questions!

@JohnG-Automox Makes sense, thanks. Since we can’t control the final restart window settings, do we know what happens when we hit “Restart later”? Will users be prompted to restart the following day, and is there a deferral limit until the PC force restarts to install Win 11? 

@JohnG-Automox Another update: after the Win11 update was downloaded, it just prompted me, saying, “You are about to be signed out. The Win 11 installation assistant will reboot your device to complete the install.” It force-rebooted the PC in a minute. 
Based on your previous comment, there is no prompt to restart later or restart now. This is not a good end-user experience. 

Userlevel 3

Hi @amoxuser,

It is possible that the behavior of the Windows Installation Assistant has changed, or there is something blocking like anti-virus blocking the native restart notifications from appearing on the device.

I saw a few mentions of this behavior here: https://www.reddit.com/r/PowerShell/comments/yd9jfo/comment/k0y8m7f/

You can try adding the /NoRestartUI switch to the ArgumentList on line 166 of remediation to suppress the auto-restart action entirely:

Start-Process -FilePath "$PackagePath" -ArgumentList ('/copylogs $LogPath', '/quietinstall', '/skipeula', '/auto upgrade', '/NoRestartUI' )

 

 

 

Reply