Write-Host "=== CHROME NOTIFICATION RESTORATION SCRIPT ===" -ForegroundColor Cyan # 1. Remove Chrome Enterprise Registry Policy (Restores user control over prompts) Write-Host "[+] Removing Registry Policies to unblock notification settings..." -ForegroundColor Windows $RegistryPaths = @( "HKLM:\SOFTWARE\Policies\Google\Chrome", "HKCU:\SOFTWARE\Policies\Google\Chrome" ) foreach ($RegPath in $RegistryPaths) { if (Test-Path $RegPath) { # Check if the specific configuration value exists if (Get-ItemProperty -Path $RegPath -Name "DefaultNotificationsSetting" -ErrorAction SilentlyContinue) { Remove-ItemProperty -Path $RegPath -Name "DefaultNotificationsSetting" -Force -ErrorAction SilentlyContinue Write-Host " -> Removed 'DefaultNotificationsSetting' policy from: $RegPath" -ForegroundColor Green } # Clean up the Google\Chrome policy keys if they are now completely empty $SubKeys = Get-ChildItem -Path $RegPath -ErrorAction SilentlyContinue $Values = Get-ItemProperty -Path $RegPath -ErrorAction SilentlyContinue | Get-Member -MemberType NoteProperty if (-not $SubKeys -and -not $Values) { Remove-Item -Path $RegPath -Force -ErrorAction SilentlyContinue } } } # 2. Close running Chrome processes to ensure settings apply cleanly Write-Host "`n[+] Terminating running Google Chrome instances to apply changes..." -ForegroundColor Windows $ChromeProcesses = Get-Process -Name "chrome" -ErrorAction SilentlyContinue if ($ChromeProcesses) { Stop-Process -Name "chrome" -Force Start-Sleep -Seconds 2 Write-Host " -> Chrome processes closed." -ForegroundColor Yellow } Write-Host "`n=== RECONFIG COMPLETE ===" -ForegroundColor Cyan Write-Host "The global notification block has been removed. Chrome will now default back to asking the user for notification permissions." -ForegroundColor Green