Skip to content

Instantly share code, notes, and snippets.

@Adobe-Android
Created February 23, 2026 19:10
Show Gist options
  • Select an option

  • Save Adobe-Android/54046e916616fc1142b6b2e5ff4534e9 to your computer and use it in GitHub Desktop.

Select an option

Save Adobe-Android/54046e916616fc1142b6b2e5ff4534e9 to your computer and use it in GitHub Desktop.
Windows 10 Enterprise LTSC Registry Edits
# This first line sets your PowerShell execution policy. This is often required to be able to run locally created PowerShell scripts.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
$values = @{
"CompositionEditionID" = "EnterpriseS"
"EditionID" = "IoTEnterpriseS"
"ProductName" = "Windows 10 IoT Enterprise LTSC 2021"
}
foreach ($key in $values.Keys) {
try {
if ($values[$key] -is [byte[]]) {
Set-ItemProperty -Path $registryPath -Name $key -Value $values[$key] -Type Binary -Force
}
elseif ($values[$key] -is [int]) {
Set-ItemProperty -Path $registryPath -Name $key -Value $values[$key] -Type DWord -Force
}
else {
Set-ItemProperty -Path $registryPath -Name $key -Value $values[$key] -Type String -Force
}
}
catch {
Write-Output("Failed to set registry key: $key")
}
}
Write-Output("Registry values have been updated successfully.")
# This first line sets your PowerShell execution policy. This is often required to be able to run locally created PowerShell scripts.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
$values = @{
"CompositionEditionID" = "EnterpriseS"
"EditionID" = "EnterpriseS"
"ProductName" = "Windows 10 Enterprise LTSC 2021"
}
foreach ($key in $values.Keys) {
try {
if ($values[$key] -is [byte[]]) {
Set-ItemProperty -Path $registryPath -Name $key -Value $values[$key] -Type Binary -Force
}
elseif ($values[$key] -is [int]) {
Set-ItemProperty -Path $registryPath -Name $key -Value $values[$key] -Type DWord -Force
}
else {
Set-ItemProperty -Path $registryPath -Name $key -Value $values[$key] -Type String -Force
}
}
catch {
Write-Output("Failed to set registry key: $key")
}
}
Write-Output("Registry values have been updated successfully.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment