# ChromeとEdgeの拡張機能削除ポリシーをサイレントに解除するスクリプト
# --- Chrome の設定解除 ---
$chromeBaseRegistryPath = "HKLM:\Software\Policies\Google\Chrome"
$chromeValueName = "ExtensionSettings"
# ChromeのExtensionSettingsレジストリ値が存在する場合、サイレントに削除
if (Test-Path "$chromeBaseRegistryPath\$chromeValueName") {
Remove-ItemProperty -Path $chromeBaseRegistryPath -Name $chromeValueName -Force | Out-Null
}
# --- Edge の設定解除 ---
$edgeBaseRegistryPath = "HKLM:\Software\Policies\Microsoft\Edge"
$edgeValueName = "ExtensionSettings"
# EdgeのExtensionSettingsレジストリ値が存在する場合、サイレントに削除
if (Test-Path "$edgeBaseRegistryPath\$edgeValueName") {
Remove-ItemProperty -Path $edgeBaseRegistryPath -Name $edgeValueName -Force | Out-Null
}