Här har du ett powershell script som sätter registervärdena
$registryPath1 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
$Name1 = "NoAutoUpdate"
$value1 = "1"
$registryPath2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\"
$Name2 = "TargetReleaseVersion"
$value2 = "1"
$registryPath3 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\"
$Name3 = "TargetReleaseVersionInfo"
$value3 = "21H2"
$registryPath4 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\"
$Name4 = "ProductVersion"
$value4 = "Windows 10"
IF(!(Test-Path $registryPath1))
{
New-Item -Path $registryPath1 -Force | Out-Null
New-ItemProperty -Path $registryPath1 -Name $name1 -Value $value1 -PropertyType DWORD -Force
}
ELSE {
New-ItemProperty -Path $registryPath1 -Name $name1 -Value $value1 -PropertyType DWORD -Force
}
IF(!(Test-Path $registryPath2))
{
New-Item -Path $registryPath2 -Force | Out-Null
New-ItemProperty -Path $registryPath2 -Name $name2 -Value $value2 -PropertyType DWORD -Force
}
ELSE {
New-ItemProperty -Path $registryPath2 -Name $name2 -Value $value2 -PropertyType DWORD -Force
}
IF(!(Test-Path $registryPath3))
{
New-Item -Path $registryPath3 -Force | Out-Null
New-ItemProperty -Path $registryPath3 -Name $name3 -Value $value3 -PropertyType string -Force
}
ELSE {
New-ItemProperty -Path $registryPath3 -Name $name3 -Value $value3 -PropertyType string -Force
}
IF(!(Test-Path $registryPath4))
{
New-Item -Path $registryPath4 -Force | Out-Null
New-ItemProperty -Path $registryPath4 -Name $name4 -Value $value4 -PropertyType string -Force
}
ELSE {
New-ItemProperty -Path $registryPath4 -Name $name4 -Value $value4 -PropertyType string -Force
}