For a private preview tool provided by Microsoft, a registry value needs to be set to Type REG_DWORD value 46, then change the Base from hexadecimal to decimal. Here is a portion of the documentation I am referring to:
- Use the Edit menu or right-click to create a new DWORD (32-bit) Value and name it WUfBDF (note the only lowercase letter in this name is the 3rd ‘f’ and all the rest are uppercase).
- Next, right-click on the new value and select the Modify… option.
Make sure to choose the Decimal base and set the value to 46.
I am creating a Proactive remediation script to push out to a group of machines that need this Reg key/item for the preview tool to work.
$regkeyPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"
$regEntry = "WUfBDF"
$desiredValue = 46
function createRegEntry($path, $entry, $value){
write-output "Remediating registry entry."
if(test-path -Path $path){
write-output "$path exists. Setting $entry"
Set-ItemProperty -Path $path -Name $entry -Value $value -Type DWord -force | out-null
}else{
New-Item -Path $Path -Force
New-ItemProperty -Path $path -Name $entry -Value $value -PropertyType DWord -force | out-null
}
}
createRegEntry $regkeyPath $regEntry $desiredValue
I read the Set-ItemProperty documentation
And it shows both values in the main details pane:
Similarly, when writing your PowerShell code you could write $desiredValue = 46
or $desiredValue = 0x2E
and get the same result. They're both representations of the same number - one decimal and one hexadecimal - it just depends on your preference which format you use.