# Script to silently disable the Chrome and Edge extension removal-prevention policies
# --- Disable Chrome Policy ---
$chromeBaseRegistryPath = "HKLM:\Software\Policies\Google\Chrome"
$chromeValueName = "ExtensionSettings"
# Silently delete the Chrome ExtensionSettings registry value if it exists
if (Test-Path "$chromeBaseRegistryPath\$chromeValueName") {
Remove-ItemProperty -Path $chromeBaseRegistryPath -Name $chromeValueName -Force | Out-Null
}
# --- Disable Edge Policy ---
$edgeBaseRegistryPath = "HKLM:\Software\Policies\Microsoft\Edge"
$edgeValueName = "ExtensionSettings"
# Silently delete the Edge ExtensionSettings registry value if it exists
if (Test-Path "$edgeBaseRegistryPath\$edgeValueName") {
Remove-ItemProperty -Path $edgeBaseRegistryPath -Name $edgeValueName -Force | Out-Null
}