KB – Target Release Version for 20H2 and 21H1

Since the target release version CSP is still not working since 20H2 and Microsoft seems not able to fix this, we need to change the target release version via registry.

The reason why the CSP does not work is, that Microsoft introduced letters in the Windows version – like 20H2 or 21H2. The CSP only supports numbers and will fail when a letter is used in the value.

So, since the CSP does not work here, we have to use registry settings to configure the target release version.

Another issue here – we can’t use the normal custom profile for adding the regkey, since the configuration is done in the Policy hive. And as you might know, this hive is not accessible via CSP.

How can we now add the registry key via profile?

The answer is simple: PowerShell. Camille posted the way back in 2019 on his blog HERE.

The final CSP looks like this:

Target Release Version CSP

Make sure that you are targeting the CSP to the Workspace ONE Intelligent HUB!

And here is the code:

<wap-provisioningdoc id="d2374172-212c-4025-8bde-8f0281182f1b" name="customprofile">
  <characteristic type="com.airwatch.winrt.powershellcommand" uuid="1230b301-bc01-4ff8-b5d7-3fdf124274dd">
    <parm name="PowershellCommand" value="Invoke-Command -ScriptBlock {if(!(Test-Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate')){New-Item 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'}}"/>
<characteristic type="com.airwatch.winrt.powershellcommand" uuid="98624590-5521-4f01-887d-a1e956d04374">
    <parm name="PowershellCommand" value="Invoke-Command -ScriptBlock {Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate' -Name TargetReleaseVersion -value '00000001' -Type DWord -Force}"/>
<characteristic type="com.airwatch.winrt.powershellcommand" uuid="7e84c2ee-b9cc-4fed-9f22-d9cf218e5f33">
    <parm name="PowershellCommand" value="Invoke-Command -ScriptBlock {Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate' -Name TargetReleaseVersionInfo -value '21H1' -Type String -Force}"/>

As you can see, there are three commands in it.

if(!(Test-Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate')){New-Item 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'}

This command will check if the WindowsUpdate hive is already configured. If not, it will create the hive. If the hive is not created before we adding the regkeys, the other commands will fail.

Next, we’ll enable the target release version configuration:

Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate' -Name TargetReleaseVersion -value '00000001' -Type DWord -Force

And last but not least we configuring the Windows version we want to stay on – or we want to upgrade to.

Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate' -Name TargetReleaseVersionInfo -value '21H1' -Type String -Force

Of course you can also change the value to “20H2” or “1909”.

You will find all custom CSP’s on my GITHUB HERE.

Leave a Reply

Your email address will not be published. Required fields are marked *.

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.

BCF Shop Theme By aThemeArt.