Skip to main content

Disable Defender Antivirus taskbar notifications

Overview

About this script

This script improves your privacy on Windows.

These changes use Windows system commands to update your settings.

This script disables Defender Antivirus-related notifications on the Windows taskbar.

It removes taskbar integrations (AppUserModelId) for Defender components 1. AppUserModelIds link processes, files, and windows to specific applications, organizing them on the Windows taskbar, managing Jump Lists, and controlling pinning 2.

This script may enhance privacy by reducing the visibility of antivirus-related information on your desktop. It may also slightly improve system performance by disabling these notification processes.

However, disabling these notifications may reduce your awareness of important antivirus issues.

Caution

Disabling taskbar integrations may leave you unaware of critical antivirus issues on your system.

Technical Details

This script removes these AppUserModelIds:

  • Microsoft.Windows.Defender 1
  • Windows.Defender 1

This script uses Batch (batchfile) scripting language.

Not Advised

This script should only be used by advanced users. This script is not recommended for daily use as it breaks important functionality. Do not run it without having backups and system snapshots.

Implementation Details
  • Language: batch

  • Required Privileges: Administrator rights

  • Compatibility: Windows only

  • Reversibility: Can be undone using provided revert script

Explore Categories

This action belongs to Disable Defender Antivirus notifications category. This category contains scripts to disable various notifications from Defender Antivirus. Defender Antivirus, built into Windows, protects your device from malware and other threats. It analyzes your data using machine learning and cloud-based protection technologies. This data analysis... Read more on category page ▶

Apply now

Choose one of three ways to apply:

  1. Automatically via privacy.sexy: The easiest and safest option.
  2. Manually by downloading: Requires downloading a file.
  3. Manually by copying: Advanced flexibility.

Alternative 1. Apply with Privacy.sexy

privacy.sexy is free and open-source application that lets securely apply this action easily.

Open privacy.sexy

You can fully restore this action (revert back to the original behavior) using the application.

privacy.sexy instructions
  1. Open or download the desktop application
  2. Search for the script name: Disable Defender Antivirus taskbar notifications.
  3. Check the script by clicking on the checkbox.
  4. Click on Run button at the bottom of the page.

Alternative 2. Download

Irreversible Changes

This script is irreversible, meaning there is no straightforward method to restore changes once applied. Exercise caution before running, restoring it may not be possible.

  1. Download the script file by clicking on the button below:

    Download script

  2. Run the script file by clicking on it.

Download revert script

This file restores your system to its original state, before this script is applied.

Download restore script

Alternative 3. Copy

This is for advanced users. Consider automatically applying or downloading the script for simpler way.

  1. Open Command Prompt as administrator.
HELP: Step-by-step guide
  1. Click on Start menu

  2. Type cmd

  3. Right click on Command Prompt select Run as administrator

  4. Click on Yes to run Command Prompt


Animation showing how to open terminal as administrator on Windows 11

  1. Copy the following code:
Code to apply changes
:: Soft-delete the registry key: HKLM\SOFTWARE\Classes\AppUserModelId\Microsoft.Windows.Defender 
PowerShell -ExecutionPolicy Unrestricted -Command "function Copy-Acl($Src, $Dst) { $srcKeys = @(Get-ChildItem -LiteralPath $Src -ErrorAction SilentlyContinue); foreach ($key in $srcKeys) { $dstKey = Join-Path $Dst $key.PSChildName; Copy-Acl -Src $key.PSPath -Dst $dstKey; }; $acl = Get-Acl -Path $Src -ErrorAction Stop; $sections = [System.Security.AccessControl.AccessControlSections]::All -band (-bnot [System.Security.AccessControl.AccessControlSections]::Owner); $sddl = $acl.GetSecurityDescriptorSddlForm($sections); $acl.SetSecurityDescriptorSddlForm($sddl, $sections); Set-Acl -Path $Dst -AclObject $acl -ErrorAction Stop; }; function Rename-KeyWithAcl($Old, $New) { try { Copy-Item -LiteralPath $Old -Destination $New -Recurse -Force -ErrorAction Stop; } catch { throw "^""Failed to copy: $_"^""; }; try { Copy-Acl -Src $Old -Dst $New; } catch { Write-Warning "^""Failed to copy ACL: $_"^""; }; try { Remove-Item -LiteralPath $Old -Force -Recurse -ErrorAction Stop | Out-Null; } catch { try { Remove-Item -LiteralPath $New -Force -Recurse -ErrorAction Stop | Out-Null; } catch { Write-Warning "^""Failed to clean up: $_"^""; }; throw "^""Failed to remove: $_"^""; }; }; $rawPath='HKLM\SOFTWARE\Classes\AppUserModelId\Microsoft.Windows.Defender'; $suffix='.OLD'; $global:ok = 0; $global:skip = 0; $global:fail = 0; function Rename-KeyTree($Path) { Write-Host "^""Processing key: $Path"^""; if (-Not (Test-Path -LiteralPath $Path)) { Write-Host 'Skipping: Key does not exist.'; $global:skip++; return; }; $values = (Get-Item -LiteralPath $Path -ErrorAction Stop | Select-Object -ExpandProperty Property); foreach ($value in $values) { Write-Host "^""Renaming '$value'"^""; if ($value.EndsWith($suffix)) { Write-Host 'Skipping: Has suffix.'; $global:skip++; continue; }; $backupName = $value + $suffix; Write-Host "^""Renaming to '$backupName'."^""; try { Rename-ItemProperty -LiteralPath $Path -Name $value -NewName $backupName -ErrorAction Stop; Write-Host 'Successfully renamed.'; $global:ok++; } catch { Write-Warning "^""Failed to rename value: $_"^""; $global:fail++; }; }; $subkeys = @(Get-ChildItem -LiteralPath $Path -ErrorAction SilentlyContinue); foreach ($key in $subkeys) { Rename-KeyTree $key.PSPath; }; Write-Host "^""Renaming key '$Path'."^""; if ($Path.EndsWith($suffix)) { Write-Host 'Skipping: Has suffix.'; $global:skip++; } else { $backupPath = $Path + $suffix; while (Test-Path -LiteralPath $backupPath) { $backupPath += $suffix; }; Write-Host "^""Renaming to '$backupPath'."^""; try { Rename-KeyWithAcl -Old $Path -New $backupPath -ErrorAction Stop; Write-Host 'Successfully renamed.'; $global:ok++; } catch { Write-Warning "^""Failed to rename: $_"^""; $global:fail++; }; }; }; Write-Host "^""Soft deleting registry key '$rawPath' recursively."^""; $hive = $rawPath.Split('\')[0]; $path = $hive + ':' + $rawPath.Substring($hive.Length); Rename-KeyTree $path; $totalItems = $global:ok + $global:skip + $global:fail; Write-Host "^""Total items: $totalItems, Renamed: $global:ok, Skipped: $global:skip, Failed: $global:fail"^""; if (($totalItems -eq 0) -or ($totalItems -eq $global:skip)) { Write-Host 'No items were processed. The operation had no effect.'; } elseif ($global:fail -eq $totalItems) { throw "^""Operation failed. All $global:fail items could not be processed."^""; } elseif ($global:ok) { Write-Host "^""Successfully processed $global:ok item(s)."^""; }"
:: Soft-delete the registry key: HKLM\SOFTWARE\Classes\AppUserModelId\Windows.Defender
PowerShell -ExecutionPolicy Unrestricted -Command "function Copy-Acl($Src, $Dst) { $srcKeys = @(Get-ChildItem -LiteralPath $Src -ErrorAction SilentlyContinue); foreach ($key in $srcKeys) { $dstKey = Join-Path $Dst $key.PSChildName; Copy-Acl -Src $key.PSPath -Dst $dstKey; }; $acl = Get-Acl -Path $Src -ErrorAction Stop; $sections = [System.Security.AccessControl.AccessControlSections]::All -band (-bnot [System.Security.AccessControl.AccessControlSections]::Owner); $sddl = $acl.GetSecurityDescriptorSddlForm($sections); $acl.SetSecurityDescriptorSddlForm($sddl, $sections); Set-Acl -Path $Dst -AclObject $acl -ErrorAction Stop; }; function Rename-KeyWithAcl($Old, $New) { try { Copy-Item -LiteralPath $Old -Destination $New -Recurse -Force -ErrorAction Stop; } catch { throw "^""Failed to copy: $_"^""; }; try { Copy-Acl -Src $Old -Dst $New; } catch { Write-Warning "^""Failed to copy ACL: $_"^""; }; try { Remove-Item -LiteralPath $Old -Force -Recurse -ErrorAction Stop | Out-Null; } catch { try { Remove-Item -LiteralPath $New -Force -Recurse -ErrorAction Stop | Out-Null; } catch { Write-Warning "^""Failed to clean up: $_"^""; }; throw "^""Failed to remove: $_"^""; }; }; $rawPath='HKLM\SOFTWARE\Classes\AppUserModelId\Windows.Defender'; $suffix='.OLD'; $global:ok = 0; $global:skip = 0; $global:fail = 0; function Rename-KeyTree($Path) { Write-Host "^""Processing key: $Path"^""; if (-Not (Test-Path -LiteralPath $Path)) { Write-Host 'Skipping: Key does not exist.'; $global:skip++; return; }; $values = (Get-Item -LiteralPath $Path -ErrorAction Stop | Select-Object -ExpandProperty Property); foreach ($value in $values) { Write-Host "^""Renaming '$value'"^""; if ($value.EndsWith($suffix)) { Write-Host 'Skipping: Has suffix.'; $global:skip++; continue; }; $backupName = $value + $suffix; Write-Host "^""Renaming to '$backupName'."^""; try { Rename-ItemProperty -LiteralPath $Path -Name $value -NewName $backupName -ErrorAction Stop; Write-Host 'Successfully renamed.'; $global:ok++; } catch { Write-Warning "^""Failed to rename value: $_"^""; $global:fail++; }; }; $subkeys = @(Get-ChildItem -LiteralPath $Path -ErrorAction SilentlyContinue); foreach ($key in $subkeys) { Rename-KeyTree $key.PSPath; }; Write-Host "^""Renaming key '$Path'."^""; if ($Path.EndsWith($suffix)) { Write-Host 'Skipping: Has suffix.'; $global:skip++; } else { $backupPath = $Path + $suffix; while (Test-Path -LiteralPath $backupPath) { $backupPath += $suffix; }; Write-Host "^""Renaming to '$backupPath'."^""; try { Rename-KeyWithAcl -Old $Path -New $backupPath -ErrorAction Stop; Write-Host 'Successfully renamed.'; $global:ok++; } catch { Write-Warning "^""Failed to rename: $_"^""; $global:fail++; }; }; }; Write-Host "^""Soft deleting registry key '$rawPath' recursively."^""; $hive = $rawPath.Split('\')[0]; $path = $hive + ':' + $rawPath.Substring($hive.Length); Rename-KeyTree $path; $totalItems = $global:ok + $global:skip + $global:fail; Write-Host "^""Total items: $totalItems, Renamed: $global:ok, Skipped: $global:skip, Failed: $global:fail"^""; if (($totalItems -eq 0) -or ($totalItems -eq $global:skip)) { Write-Host 'No items were processed. The operation had no effect.'; } elseif ($global:fail -eq $totalItems) { throw "^""Operation failed. All $global:fail items could not be processed."^""; } elseif ($global:ok) { Write-Host "^""Successfully processed $global:ok item(s)."^""; }"
  1. Right click on command prompt to paste it.
  2. Press Enter to apply remaining code.

Copy restore code

Copy and run the following code to restore changes:

Revert code
:: Restore registry key: HKLM\SOFTWARE\Classes\AppUserModelId\Microsoft.Windows.Defender 
PowerShell -ExecutionPolicy Unrestricted -Command "function Copy-Acl($Src, $Dst) { $srcKeys = @(Get-ChildItem -LiteralPath $Src -ErrorAction SilentlyContinue); foreach ($key in $srcKeys) { $dstKey = Join-Path $Dst $key.PSChildName; Copy-Acl -Src $key.PSPath -Dst $dstKey; }; $acl = Get-Acl -Path $Src -ErrorAction Stop; $sections = [System.Security.AccessControl.AccessControlSections]::All -band (-bnot [System.Security.AccessControl.AccessControlSections]::Owner); $sddl = $acl.GetSecurityDescriptorSddlForm($sections); $acl.SetSecurityDescriptorSddlForm($sddl, $sections); Set-Acl -Path $Dst -AclObject $acl -ErrorAction Stop; }; function Rename-KeyWithAcl($Old, $New) { try { Copy-Item -LiteralPath $Old -Destination $New -Recurse -Force -ErrorAction Stop; } catch { throw "^""Failed to copy: $_"^""; }; try { Copy-Acl -Src $Old -Dst $New; } catch { Write-Warning "^""Failed to copy ACL: $_"^""; }; try { Remove-Item -LiteralPath $Old -Force -Recurse -ErrorAction Stop | Out-Null; } catch { try { Remove-Item -LiteralPath $New -Force -Recurse -ErrorAction Stop | Out-Null; } catch { Write-Warning "^""Failed to clean up: $_"^""; }; throw "^""Failed to remove: $_"^""; }; }; $rawPath='HKLM\SOFTWARE\Classes\AppUserModelId\Microsoft.Windows.Defender'; $suffix ='.OLD'; $global:fail = 0; $global:ok = 0; function Get-Real($s) { while ($s.EndsWith($suffix)) { $s = $s.Substring(0, $s.Length - $suffix.Length); }; return $s; }; function Restore-KeyTree($Path) { $dest = Get-Real $Path; $src = $Path; Write-Host "^""Restoring key: '$dest' from '$src'"^""; if (-Not $src.EndsWith($suffix)) { $src += $suffix; if (-Not (Test-Path -LiteralPath $src)) { Write-Host 'Skipping: No data.'; Restore-Children $dest; return; }; }; if (Test-Path -LiteralPath $dest) { Write-Host 'Skipping to avoid data loss. Key already exists.'; Write-Warning "^""Manual intervention may be required to fully restore from '$src'."^""; } else { try { Rename-KeyWithAcl -Old $src -New $dest -ErrorAction Stop; Write-Host 'Successfully restored.'; $global:ok++; } catch { Write-Warning "^""Failed: $_"^""; $global:fail++; }; }; Restore-Children $dest; }; function Restore-Children($Path) { Write-Host "^""Restoring values in '$Path'"^""; if (-Not (Test-Path -LiteralPath $Path)) { Write-Host 'Skipping: Key does not exist. No action needed.'; return; }; $values = ( Get-Item -LiteralPath $Path -ErrorAction Stop | Select-Object -ExpandProperty Property ); foreach ($value in $values) { Write-Host "^""Restoring value '$value'"^""; if (-Not $value.EndsWith($suffix)) { Write-Host 'Skipping: No action needed.'; continue; }; $real = Get-Real $value; Write-Host "^""Renaming to '$real'."^""; try { Rename-ItemProperty -LiteralPath $Path -Name $value -NewName $real -ErrorAction Stop; Write-Host 'Successfully restored.'; $global:ok++; } catch { Write-Warning "^""Failed: $_"^""; $global:fail++; }; }; $keys = @(Get-ChildItem -LiteralPath $Path -ErrorAction SilentlyContinue); foreach ($key in $keys) { Restore-KeyTree $key.PSPath; }; }; Write-Host "^""Restoring registry key '$rawPath' recursively."^""; $hive = $rawPath.Split('\')[0]; $path = $hive + ':' + $rawPath.Substring($hive.Length); Restore-KeyTree $path; if ($global:fail) { Write-Error 'Failed to restore'; Exit 1; }"
:: Restore registry key: HKLM\SOFTWARE\Classes\AppUserModelId\Windows.Defender
PowerShell -ExecutionPolicy Unrestricted -Command "function Copy-Acl($Src, $Dst) { $srcKeys = @(Get-ChildItem -LiteralPath $Src -ErrorAction SilentlyContinue); foreach ($key in $srcKeys) { $dstKey = Join-Path $Dst $key.PSChildName; Copy-Acl -Src $key.PSPath -Dst $dstKey; }; $acl = Get-Acl -Path $Src -ErrorAction Stop; $sections = [System.Security.AccessControl.AccessControlSections]::All -band (-bnot [System.Security.AccessControl.AccessControlSections]::Owner); $sddl = $acl.GetSecurityDescriptorSddlForm($sections); $acl.SetSecurityDescriptorSddlForm($sddl, $sections); Set-Acl -Path $Dst -AclObject $acl -ErrorAction Stop; }; function Rename-KeyWithAcl($Old, $New) { try { Copy-Item -LiteralPath $Old -Destination $New -Recurse -Force -ErrorAction Stop; } catch { throw "^""Failed to copy: $_"^""; }; try { Copy-Acl -Src $Old -Dst $New; } catch { Write-Warning "^""Failed to copy ACL: $_"^""; }; try { Remove-Item -LiteralPath $Old -Force -Recurse -ErrorAction Stop | Out-Null; } catch { try { Remove-Item -LiteralPath $New -Force -Recurse -ErrorAction Stop | Out-Null; } catch { Write-Warning "^""Failed to clean up: $_"^""; }; throw "^""Failed to remove: $_"^""; }; }; $rawPath='HKLM\SOFTWARE\Classes\AppUserModelId\Windows.Defender'; $suffix ='.OLD'; $global:fail = 0; $global:ok = 0; function Get-Real($s) { while ($s.EndsWith($suffix)) { $s = $s.Substring(0, $s.Length - $suffix.Length); }; return $s; }; function Restore-KeyTree($Path) { $dest = Get-Real $Path; $src = $Path; Write-Host "^""Restoring key: '$dest' from '$src'"^""; if (-Not $src.EndsWith($suffix)) { $src += $suffix; if (-Not (Test-Path -LiteralPath $src)) { Write-Host 'Skipping: No data.'; Restore-Children $dest; return; }; }; if (Test-Path -LiteralPath $dest) { Write-Host 'Skipping to avoid data loss. Key already exists.'; Write-Warning "^""Manual intervention may be required to fully restore from '$src'."^""; } else { try { Rename-KeyWithAcl -Old $src -New $dest -ErrorAction Stop; Write-Host 'Successfully restored.'; $global:ok++; } catch { Write-Warning "^""Failed: $_"^""; $global:fail++; }; }; Restore-Children $dest; }; function Restore-Children($Path) { Write-Host "^""Restoring values in '$Path'"^""; if (-Not (Test-Path -LiteralPath $Path)) { Write-Host 'Skipping: Key does not exist. No action needed.'; return; }; $values = ( Get-Item -LiteralPath $Path -ErrorAction Stop | Select-Object -ExpandProperty Property ); foreach ($value in $values) { Write-Host "^""Restoring value '$value'"^""; if (-Not $value.EndsWith($suffix)) { Write-Host 'Skipping: No action needed.'; continue; }; $real = Get-Real $value; Write-Host "^""Renaming to '$real'."^""; try { Rename-ItemProperty -LiteralPath $Path -Name $value -NewName $real -ErrorAction Stop; Write-Host 'Successfully restored.'; $global:ok++; } catch { Write-Warning "^""Failed: $_"^""; $global:fail++; }; }; $keys = @(Get-ChildItem -LiteralPath $Path -ErrorAction SilentlyContinue); foreach ($key in $keys) { Restore-KeyTree $key.PSPath; }; }; Write-Host "^""Restoring registry key '$rawPath' recursively."^""; $hive = $rawPath.Split('\')[0]; $path = $hive + ':' + $rawPath.Substring($hive.Length); Restore-KeyTree $path; if ($global:fail) { Write-Error 'Failed to restore'; Exit 1; }"

Support

This website relies on your support.

Support now

Your donation helps keep the project alive and improves its content ❤️.

Share this page: