Write-Host "=== MICROSOFT EDGE NOTIFICATION RESTORATION SCRIPT ===" -ForegroundColor Cyan # 1. Remove Edge Enterprise Registry Policy (Restores user control over prompts) Write-Host "[+] Removing Registry Policies to unblock notification settings..." -ForegroundColor Windows $RegistryPaths = @( "HKLM:\SOFTWARE\Policies\Microsoft\Edge", "HKCU:\SOFTWARE\Policies\Microsoft\Edge" ) 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 Microsoft\Edge 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 Edge processes to ensure settings apply cleanly Write-Host "`n[+] Terminating running Microsoft Edge instances to apply changes..." -ForegroundColor Windows $EdgeProcesses = Get-Process -Name "msedge" -ErrorAction SilentlyContinue if ($EdgeProcesses) { Stop-Process -Name "msedge" -Force Start-Sleep -Seconds 2 Write-Host " -> Edge processes closed." -ForegroundColor Yellow } Write-Host "`n=== RECONFIG COMPLETE ===" -ForegroundColor Cyan Write-Host "The global notification block has been removed. Edge will now default back to asking the user for notification permissions." -ForegroundColor Green