Disable Defender Antivirus minifilter driver
- Single actionThis page belongs to a script, containing basic changes to achieve a task.
- Windows onlyThis script improves your privacy on Windows
- Impact: HighSystem Functionality Loss Risk: High
This action improves privacy with high impact when you run the recommended script. - Batch (batchfile)These changes use Windows system commands to update your settings.
- Fully reversible
You can fully restore this action (revert back to the original behavior) using this website.
The restore/revert methods provided here can help you fix issues.
Overview
This script disables Defender's core monitoring component that tracks and controls your system activities.
This component has several names, including:
- Windows Defender Mini-Filter Driver 1 2
- Microsoft antimalware file system filter driver 3
- Microsoft Defender Antivirus On-Access Malware Protection Mini-Filter Driver 3 4
- Windows Defender Real-Time scanning filesystem filter driver 5
- Windows Defender On-Access Malware Protection Mini-Filter Driver 2
- Microsoft Defender Antivirus Mini-Filter Driver 4
This driver is a component of Defender Antivirus 6 7 8 and Defender for Endpoint 9. It runs at the deepest level of Windows and monitors your system activities 10.
The driver has these primary functions:
- Monitors and restricts activities such as:
- Collects and reports telemetry on system activity 11
- Enables communication between Defender components 11 12 19 such as
MsMpEng.exe
13 15 19 - Provides security features such as:
This script enhances privacy by:
- Stopping continuous system monitoring by Windows Defender
- Blocking the collection of system activity data
- Reducing telemetry sent to Microsoft
- Limiting surveillance capabilities
- Allowing deeper privacy configurations, including disabling Defender
This script may improve system performance by:
- Reducing background activities
- Using less system resources
- Removing file system slowdowns
This script may increase system stability. This driver can sometimes cause system crashes (blue screen errors) 3 5 12. Disabling it may prevent these issues 1 21.
However, it may reduce your security by:
- Impairing real-time malware protection
- Removing protection against unauthorized system changes
- Stopping monitoring of suspicious process activities
- Disabling protection of sensitive system files
This action may leave your system more vulnerable to malware and unwanted changes.
Technical Details
The driver is installed by Windows-Defender-Drivers
package 22.
This script:
- Removes
HKLM\SYSTEM\CurrentControlSet\Services\WdFilter\Instances\WdFilter Instance!Altitude
16- This method worked on older versions of Defender Antivirus before April 2024 16
- Tests show on modern Windows versions (Windows 10 Pro ≥ 22H2, Windows 11 Pro ≥ 21H2), the operation reports success but the value remains unchanged.
- Disables the
WdFilter
driver service 2 3 - Removes the driver file at
%SYSTEMROOT%\System32\drivers\WdFilter.sys
2 3 4
Overview of default service statuses
OS Version | Status | Start type |
---|---|---|
Windows 10 (≥ 22H2) | 🟢 Running | Boot |
Windows 11 (≥ 23H2) | 🟢 Running | Boot |
- Not Advised
This script should only be used by advanced users.
This script is not recommended for daily use as it breaks important functionality.
Consider creating a system restore point before doing any changes.
- Security Trade-off
This action prioritizes privacy over certain security features. It's not recommended and should only be used by advanced users after understanding its implications.
Increased Privacy
Enhanced privacy through reduced data collection and trackingDecreased Security
Some security features will be disabled or limitedThis script can be reversed, this allows you to restore the default system security.
Sources
- PAGE FAULT IN NONPAGED AREA (WdFilter.sys) Blue Screen. thewindowsclub.com. (2024).
Original: https://www.thewindowsclub.com/page-fault-in-nonpaged-area-wdfilter-sys
Archived: https://archive.ph/2024.10.27-163912/https://www.thewindowsclub.com/page-fault-in-nonpaged-area-wdfilter-sys - Windows Defender Mini-Filter Driver - Windows 8 Service - batcmd.com. batcmd.com. (2024).
Original: https://batcmd.com/windows/8/services/wdfilter
Archived: https://archive.ph/2024.10.27-163919/https://batcmd.com/windows/8/services/wdfilter/ - Microsoft Defender Antivirus Mini-Filter Driver - Windows 11 Service - batcmd.com. batcmd.com. (2024).
Original: https://batcmd.com/windows/11/services/wdfilter
Archived: https://archive.ph/2024.10.27-163923/https://batcmd.com/windows/11/services/wdfilter/ - Microsoft Defender Antivirus Mini-Filter Driver - Windows 10 Service - batcmd.com. batcmd.com. (2024).
Original: https://batcmd.com/windows/10/services/wdfilter
Archived: https://archive.ph/2024.10.27-163930/https://batcmd.com/windows/10/services/wdfilter/ - SOLUTION: bootrec /fixboot Access is Denied. Triple-S Computers Blog – Louisville, KY computer repair specialist. triplescomputers.com. (2024).
Original: https://triplescomputers.com/blog/uncategorized/solution-bootrec-fixboot-access-is-denied
Archived: https://archive.ph/2024.10.27-163936/https://triplescomputers.com/blog/uncategorized/solution-bootrec-fixboot-access-is-denied/ - When the hunter becomes the hunted: Using custom callbacks to disable EDRs. www.alteredsecurity.com. (2024).
Original: https://www.alteredsecurity.com/post/when-the-hunter-becomes-the-hunted-using-custom-callbacks-to-disable-edrs
Archived: https://archive.ph/2024.10.27-163942/https://www.alteredsecurity.com/post/when-the-hunter-becomes-the-hunted-using-custom-callbacks-to-disable-edrs - Antimalware support on UWF-protected devices. Microsoft Learn. learn.microsoft.com. (2024).
Original: https://learn.microsoft.com/en-us/windows/iot/iot-enterprise/customize/uwf-antimalware-support
Archived: https://archive.ph/2024.10.27-165820/https://learn.microsoft.com/en-us/windows/iot/iot-enterprise/customize/uwf-antimalware-support - Configure antivirus software to work with SQL Server - SQL Server. Microsoft Learn. learn.microsoft.com. (2024).
Original: https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/security/antivirus-and-sql-server
Archived: https://archive.ph/2024.10.27-164210/https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/security/antivirus-and-sql-server - Troubleshoot Microsoft Defender for Endpoint onboarding issues - Microsoft Defender for Endpoint. Microsoft Learn. learn.microsoft.com. (2024).
Original: https://learn.microsoft.com/en-us/defender-endpoint/troubleshoot-onboarding
Archived: https://web.archive.org/web/20240717094647/https://learn.microsoft.com/en-us/defender-endpoint/troubleshoot-onboarding - An unexpected journey into Microsoft Defender's signature World — retooling_. retooling.io. (2024).
Original: https://retooling.io/blog/an-unexpected-journey-into-microsoft-defenders-signature-world
Archived: https://web.archive.org/web/20240930174756/https://retooling.io/blog/an-unexpected-journey-into-microsoft-defenders-signature-world - 10_0_22622_601/C/Windows/System32/drivers/WdFilter.sys.strings at c598035e1a6627384d646140fe9e4d234b36b11d · privacysexy-forks/10_0_22622_601. github.com. (2024).
Original: https://github.com/privacysexy-forks/10_0_22622_601/blob/c598035e1a6627384d646140fe9e4d234b36b11d/C/Windows/System32/drivers/WdFilter.sys.strings
Archived: https://archive.ph/2024.10.27-164028/https://github.com/privacysexy-forks/10_0_22622_601/blob/c598035e1a6627384d646140fe9e4d234b36b11d/C/Windows/System32/drivers/WdFilter.sys.strings - Dissecting the Windows Defender Driver - WdFilter (Part 1) :: Up is Down and Black is White — n4r1b. n4r1b.com. (2024).
Original: https://n4r1b.com/posts/2020/01/dissecting-the-windows-defender-driver-wdfilter-part-1
Archived: https://archive.ph/2024.10.27-164137/https://n4r1b.com/posts/2020/01/dissecting-the-windows-defender-driver-wdfilter-part-1/ - Dissecting the Windows Defender Driver - WdFilter (Part 2) :: Up is Down and Black is White — n4r1b. n4r1b.com. (2024).
Original: https://n4r1b.com/posts/2020/02/dissecting-the-windows-defender-driver-wdfilter-part-2
Archived: https://archive.ph/2024.10.27-164049/https://n4r1b.com/posts/2020/02/dissecting-the-windows-defender-driver-wdfilter-part-2/ - Windows Defender Handle Exploration - saza.RE. saza.re. (2024).
Original: https://saza.re/posts/handle_exploration
Archived: https://archive.ph/2024.10.27-164055/https://saza.re/posts/handle_exploration/ - Dissecting the Windows Defender Driver - WdFilter (Part 3) :: Up is Down and Black is White — n4r1b. n4r1b.com. (2024).
Original: https://n4r1b.com/posts/2020/03/dissecting-the-windows-defender-driver-wdfilter-part-3
Archived: https://archive.ph/2024.10.27-164102/https://n4r1b.com/posts/2020/03/dissecting-the-windows-defender-driver-wdfilter-part-3/ - Breaking through Defender's Gates - Disabling Tamper Protection and other Defender components. alteredsecurity.com. (2024).
Original: https://www.alteredsecurity.com/post/disabling-tamper-protection-and-other-defender-mde-components
Archived: https://web.archive.org/web/20240725101722/https://www.alteredsecurity.com/post/disabling-tamper-protection-and-other-defender-mde-components?ref=news.risky.biz - Dissecting the Windows Defender Driver - WdFilter (Part 4) :: Up is Down and Black is White — n4r1b. n4r1b.com. (2024).
Original: https://n4r1b.com/posts/2020/04/dissecting-the-windows-defender-driver-wdfilter-part-4
Archived: https://archive.ph/2024.10.27-164114/https://n4r1b.com/posts/2020/04/dissecting-the-windows-defender-driver-wdfilter-part-4/ - Set up a Dev Drive on Windows 11. Microsoft Learn. learn.microsoft.com. (2024).
Original: https://learn.microsoft.com/en-us/windows/dev-drive
Archived: https://web.archive.org/web/20241007150442/https://learn.microsoft.com/en-us/windows/dev-drive/ - Investigating Filter Communication Ports – Winsider Seminars & Solutions Inc.. windows-internals.com. (2024).
Original: https://windows-internals.com/investigating-filter-communication-ports
Archived: https://archive.ph/2024.10.27-164443/https://windows-internals.com/investigating-filter-communication-ports/ - What Is EDR? Endpoint Detection and Response. Microsoft Security. www.microsoft.com. (2024).
Original: https://www.microsoft.com/en-us/security/business/security-101/what-is-edr-endpoint-detection-response
Archived: https://archive.ph/2024.10.27-164213/https://www.microsoft.com/en-us/security/business/security-101/what-is-edr-endpoint-detection-response - WdFilter.sys & boot loop. Wim's Space. wvdvegt.wordpress.com. (2024).
Original: https://wvdvegt.wordpress.com/2019/05/30/wdfilter-sys-boot-loop
Archived: https://archive.ph/2024.10.27-164210/https://wvdvegt.wordpress.com/2019/05/30/wdfilter-sys-boot-loop/ - nickel-x64/WinSxS/Manifests/amd64_windows-defender-drivers_31bf3856ad364e35_10.0.22621.1_none_5262daf3e8f76071.manifest at b3f8c9549e49f2a92b401b3809b210d5f78190ba · privacysexy-forks/nickel-x64. github.com. (2024).
Original: https://github.com/privacysexy-forks/nickel-x64/blob/b3f8c9549e49f2a92b401b3809b210d5f78190ba/WinSxS/Manifests/amd64_windows-defender-drivers_31bf3856ad364e35_10.0.22621.1_none_5262daf3e8f76071.manifest
Archived: https://archive.ph/2024.10.27-164219/https://github.com/privacysexy-forks/nickel-x64/blob/b3f8c9549e49f2a92b401b3809b210d5f78190ba/WinSxS/Manifests/amd64_windows-defender-drivers_31bf3856ad364e35_10.0.22621.1_none_5262daf3e8f76071.manifest
Apply Now
Choose one of three ways to apply:
Download script
Download and run the script directly- No app needed
- Offline usage
- Easy-to-apply
- Free
- Open-source
Help
How to apply or restore "Disable Defender Antivirus minifilter driver" using script
- ≈ 2 min to complete
- Tools: Web Browser
- Difficulty: Simple
- ≈ 5 instructions
- 1
Download
Download the script file by clicking on thebutton above.
Use button above to restore changes. - 2
Keep the file
If warned by your browser, keep the file. - 3
Open
Open the downloaded file. - 4
Exit
Once it's done, press any key to exit the window. - 5
Restart
Restart your computer for all changes to take effect.
Apply with privacy.sexy
Guided, automated application with safety checks- Recommended for most users
- Includes safety checks
- Free
- Open-source
- Popular
- Offline/Online usage
Help
How to apply or restore "Disable Defender Antivirus minifilter driver" using privacy.sexy
- ≈ 3 min to complete
- Tools: privacy.sexy
- Difficulty: Simple
- ≈ 4 instructions
- 2
Choose script
- Search for the script name: Disable Defender Antivirus minifilter driver
- Check the script by clicking on the checkbox.
- 3
Run
Click on ▶️ Run button at the bottom of the page.This button only appears on desktop version (recommended). On browser, use 💾 Save button.
- Apply
- Revert
:: Delete the registry value "Altitude" from the key "HKLM\SYSTEM\CurrentControlSet\Services\WdFilter\Instances\WdFilter Instance"
PowerShell -ExecutionPolicy Unrestricted -Command "$keyName = 'HKLM\SYSTEM\CurrentControlSet\Services\WdFilter\Instances\WdFilter Instance'; $valueName = 'Altitude'; $hive = $keyName.Split('\')[0]; $path = "^""$($hive):$($keyName.Substring($hive.Length))"^""; Write-Host "^""Removing the registry value '$valueName' from '$path'."^""; if (-Not (Test-Path -LiteralPath $path)) { Write-Host 'Skipping, no action needed, registry key does not exist.'; Exit 0; }; $existingValueNames = (Get-ItemProperty -LiteralPath $path).PSObject.Properties.Name; if (-Not ($existingValueNames -Contains $valueName)) { Write-Host 'Skipping, no action needed, registry value does not exist.'; Exit 0; }; try { if ($valueName -ieq '(default)') { Write-Host 'Removing the default value.'; $(Get-Item -LiteralPath $path).OpenSubKey('', $true).DeleteValue(''); } else { Remove-ItemProperty -LiteralPath $path -Name $valueName -Force -ErrorAction Stop; }; Write-Host 'Successfully removed the registry value.'; } catch { Write-Error "^""Failed to remove the registry value: $($_.Exception.Message)"^""; }"
:: Disable the service `WdFilter` using TrustedInstaller privileges
PowerShell -ExecutionPolicy Unrestricted -Command "function Invoke-AsTrustedInstaller($Script) { $principalSid = [System.Security.Principal.SecurityIdentifier]::new('S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464'); $principalName = $principalSid.Translate([System.Security.Principal.NTAccount]); $streamFile = New-TemporaryFile; $scriptFile = New-TemporaryFile; try { $scriptFile = Rename-Item -LiteralPath $scriptFile -NewName ($scriptFile.BaseName + '.ps1') -Force -PassThru; $Script | Out-File $scriptFile -Encoding UTF8; $taskName = "^""privacy$([char]0x002E)sexy invoke"^""; schtasks.exe /delete /tn $taskName /f 2>&1 | Out-Null; $executionCommand = "^""powershell.exe -ExecutionPolicy Bypass -File '$scriptFile' *>&1 | Out-File -FilePath '$streamFile' -Encoding UTF8"^""; $action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument "^""-ExecutionPolicy Bypass -Command `"^""$executionCommand`"^"""^""; $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries; Register-ScheduledTask -TaskName $taskName -Action $action -Settings $settings -Force -ErrorAction Stop | Out-Null; try { ($scheduleService = New-Object -ComObject Schedule.Service).Connect(); $scheduleService.GetFolder('\').GetTask($taskName).RunEx($null, 0, 0, $principalName) | Out-Null; $timeout = (Get-Date).AddMinutes(5); Write-Host "^""Running as $principalName"^""; while ((Get-ScheduledTaskInfo $taskName).LastTaskResult -eq 267009) { Start-Sleep -Milliseconds 200; if ((Get-Date) -gt $timeout) { Write-Warning 'Skipping: Timeout'; break; }; }; if (($result = (Get-ScheduledTaskInfo $taskName).LastTaskResult) -ne 0) { Write-Error "^""Failed, due to exit code: $result."^""; } } finally { schtasks.exe /delete /tn $taskName /f | Out-Null; }; Get-Content $streamFile } finally { Remove-Item $streamFile, $scriptFile; }; }; $cmd = '$serviceQuery = ''WdFilter'''+"^""`r`n"^""+'$stopWithDependencies= $false'+"^""`r`n"^""+'<# -- 1. Skip if service does not exist #>'+"^""`r`n"^""+'$service = Get-Service -Name $serviceQuery -ErrorAction SilentlyContinue'+"^""`r`n"^""+'if(!$service) {'+"^""`r`n"^""+' Write-Host "^""Service query `"^""$serviceQuery`"^"" did not yield any results, no need to disable it."^""'+"^""`r`n"^""+' Exit 0'+"^""`r`n"^""+'}'+"^""`r`n"^""+'$serviceName = $service.Name'+"^""`r`n"^""+'Write-Host "^""Disabling service: `"^""$serviceName`"^""."^""'+"^""`r`n"^""+'<# -- 2. Stop if running #>'+"^""`r`n"^""+'if ($service.Status -eq [System.ServiceProcess.ServiceControllerStatus]::Running) {'+"^""`r`n"^""+' Write-Host "^""`"^""$serviceName`"^"" is running, attempting to stop it."^""'+"^""`r`n"^""+' try {'+"^""`r`n"^""+' Write-Host "^""Stopping the service `"^""$serviceName`"^""."^""'+"^""`r`n"^""+' $stopParams = @{ `'+"^""`r`n"^""+' Name = $ServiceName'+"^""`r`n"^""+' Force = $true'+"^""`r`n"^""+' ErrorAction = ''Stop'''+"^""`r`n"^""+' }'+"^""`r`n"^""+' if (-not $stopWithDependencies) {'+"^""`r`n"^""+' $stopParams[''NoWait''] = $true'+"^""`r`n"^""+' }'+"^""`r`n"^""+' Stop-Service @stopParams'+"^""`r`n"^""+' Write-Host "^""Stopped `"^""$serviceName`"^"" successfully."^""'+"^""`r`n"^""+' } catch {'+"^""`r`n"^""+' if ($_.FullyQualifiedErrorId -eq ''CouldNotStopService,Microsoft.PowerShell.Commands.StopServiceCommand'') {'+"^""`r`n"^""+' Write-Warning "^""The service `"^""$serviceName`"^"" does not accept a stop command and may need to be stopped manually or on reboot."^""'+"^""`r`n"^""+' } else {'+"^""`r`n"^""+' Write-Warning "^""Failed to stop service `"^""$ServiceName`"^"". It will be stopped after reboot. Error: $($_.Exception.Message)"^""'+"^""`r`n"^""+' }'+"^""`r`n"^""+' }'+"^""`r`n"^""+'} else {'+"^""`r`n"^""+' Write-Host "^""`"^""$serviceName`"^"" is not running, no need to stop."^""'+"^""`r`n"^""+'}'+"^""`r`n"^""+'<# -- 3. Skip if service info is not found in registry #>'+"^""`r`n"^""+'$registryKey = "^""HKLM:\SYSTEM\CurrentControlSet\Services\$serviceName"^""'+"^""`r`n"^""+'if (-Not (Test-Path $registryKey)) {'+"^""`r`n"^""+' Write-Host "^""`"^""$registryKey`"^"" is not found in registry, cannot enable it."^""'+"^""`r`n"^""+' Exit 0'+"^""`r`n"^""+'}'+"^""`r`n"^""+'<# -- 4. Skip if already disabled #>'+"^""`r`n"^""+'if( $(Get-ItemProperty -Path "^""$registryKey"^"").Start -eq 4) {'+"^""`r`n"^""+' Write-Host "^""`"^""$serviceName`"^"" is already disabled from start, no further action is needed."^""'+"^""`r`n"^""+' Exit 0'+"^""`r`n"^""+'}'+"^""`r`n"^""+'<# -- 5. Disable service #>'+"^""`r`n"^""+'try {'+"^""`r`n"^""+' Set-ItemProperty `'+"^""`r`n"^""+' -LiteralPath $registryKey `'+"^""`r`n"^""+' -Name "^""Start"^"" `'+"^""`r`n"^""+' -Value 4 `'+"^""`r`n"^""+' -ErrorAction Stop'+"^""`r`n"^""+' Write-Host ''Successfully disabled the service. It will not start automatically on next boot.'''+"^""`r`n"^""+'} catch {'+"^""`r`n"^""+' Write-Error "^""Failed to disable the service. Error: $($_.Exception.Message)"^""'+"^""`r`n"^""+' Exit 1'+"^""`r`n"^""+'}'; Invoke-AsTrustedInstaller $cmd"
:: Soft delete files matching pattern: "%SYSTEMROOT%\System32\drivers\WdFilter.sys" with additional permissions
PowerShell -ExecutionPolicy Unrestricted -Command "$pathGlobPattern = "^""%SYSTEMROOT%\System32\drivers\WdFilter.sys"^""; $expandedPath = [System.Environment]::ExpandEnvironmentVariables($pathGlobPattern); Write-Host "^""Searching for items matching pattern: `"^""$($expandedPath)`"^""."^""; $renamedCount = 0; $skippedCount = 0; $failedCount = 0; Add-Type -TypeDefinition "^""using System;`r`nusing System.Runtime.InteropServices;`r`npublic class Privileges {`r`n [DllImport(`"^""advapi32.dll`"^"", ExactSpelling = true, SetLastError = true)]`r`n internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall,`r`n ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen);`r`n [DllImport(`"^""advapi32.dll`"^"", ExactSpelling = true, SetLastError = true)]`r`n internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok);`r`n [DllImport(`"^""advapi32.dll`"^"", SetLastError = true)]`r`n internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid);`r`n [StructLayout(LayoutKind.Sequential, Pack = 1)]`r`n internal struct TokPriv1Luid {`r`n public int Count;`r`n public long Luid;`r`n public int Attr;`r`n }`r`n internal const int SE_PRIVILEGE_ENABLED = 0x00000002;`r`n internal const int TOKEN_QUERY = 0x00000008;`r`n internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;`r`n public static bool AddPrivilege(string privilege) {`r`n try {`r`n bool retVal;`r`n TokPriv1Luid tp;`r`n IntPtr hproc = GetCurrentProcess();`r`n IntPtr htok = IntPtr.Zero;`r`n retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);`r`n tp.Count = 1;`r`n tp.Luid = 0;`r`n tp.Attr = SE_PRIVILEGE_ENABLED;`r`n retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);`r`n retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);`r`n return retVal;`r`n } catch (Exception ex) {`r`n throw new Exception(`"^""Failed to adjust token privileges`"^"", ex);`r`n }`r`n }`r`n public static bool RemovePrivilege(string privilege) {`r`n try {`r`n bool retVal;`r`n TokPriv1Luid tp;`r`n IntPtr hproc = GetCurrentProcess();`r`n IntPtr htok = IntPtr.Zero;`r`n retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);`r`n tp.Count = 1;`r`n tp.Luid = 0;`r`n tp.Attr = 0; // This line is changed to revoke the privilege`r`n retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);`r`n retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);`r`n return retVal;`r`n } catch (Exception ex) {`r`n throw new Exception(`"^""Failed to adjust token privileges`"^"", ex);`r`n }`r`n }`r`n [DllImport(`"^""kernel32.dll`"^"", CharSet = CharSet.Auto)]`r`n public static extern IntPtr GetCurrentProcess();`r`n}"^""; [Privileges]::AddPrivilege('SeRestorePrivilege') | Out-Null; [Privileges]::AddPrivilege('SeTakeOwnershipPrivilege') | Out-Null; $adminSid = New-Object System.Security.Principal.SecurityIdentifier 'S-1-5-32-544'; $adminAccount = $adminSid.Translate([System.Security.Principal.NTAccount]); $adminFullControlAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule( $adminAccount, [System.Security.AccessControl.FileSystemRights]::FullControl, [System.Security.AccessControl.AccessControlType]::Allow ); $foundAbsolutePaths = @(); try { $foundAbsolutePaths += @(; Get-Item -Path $expandedPath -ErrorAction Stop | Select-Object -ExpandProperty FullName; ); } catch [System.Management.Automation.ItemNotFoundException] { <# Swallow, do not run `Test-Path` before, it's unreliable for globs requiring extra permissions #>; }; $foundAbsolutePaths = $foundAbsolutePaths | Select-Object -Unique | Sort-Object -Property { $_.Length } -Descending; if (!$foundAbsolutePaths) { Write-Host 'Skipping, no items available.'; exit 0; }; Write-Host "^""Initiating processing of $($foundAbsolutePaths.Count) items from `"^""$expandedPath`"^""."^""; foreach ($path in $foundAbsolutePaths) { if (Test-Path -Path $path -PathType Container) { Write-Host "^""Skipping folder (not its contents): `"^""$path`"^""."^""; $skippedCount++; continue; }; if($revert -eq $true) { if (-not $path.EndsWith('.OLD')) { Write-Host "^""Skipping non-backup file: `"^""$path`"^""."^""; $skippedCount++; continue; }; } else { if ($path.EndsWith('.OLD')) { Write-Host "^""Skipping backup file: `"^""$path`"^""."^""; $skippedCount++; continue; }; }; $originalFilePath = $path; Write-Host "^""Processing file: `"^""$originalFilePath`"^""."^""; if (-Not (Test-Path $originalFilePath)) { Write-Host "^""Skipping, file `"^""$originalFilePath`"^"" not found."^""; $skippedCount++; exit 0; }; $originalAcl = Get-Acl -Path "^""$originalFilePath"^""; $accessGranted = $false; try { $acl = Get-Acl -Path "^""$originalFilePath"^""; $acl.SetOwner($adminAccount) <# Take Ownership (because file is owned by TrustedInstaller) #>; $acl.AddAccessRule($adminFullControlAccessRule) <# Grant rights to be able to move the file #>; Set-Acl -Path $originalFilePath -AclObject $acl -ErrorAction Stop; $accessGranted = $true; } catch { Write-Warning "^""Failed to grant access to `"^""$originalFilePath`"^"": $($_.Exception.Message)"^""; }; if ($revert -eq $true) { $newFilePath = $originalFilePath.Substring(0, $originalFilePath.Length - 4); } else { $newFilePath = "^""$($originalFilePath).OLD"^""; }; try { Move-Item -LiteralPath "^""$($originalFilePath)"^"" -Destination "^""$newFilePath"^"" -Force -ErrorAction Stop; Write-Host "^""Successfully processed `"^""$originalFilePath`"^""."^""; $renamedCount++; if ($accessGranted) { try { Set-Acl -Path $newFilePath -AclObject $originalAcl -ErrorAction Stop; } catch { Write-Warning "^""Failed to restore access on `"^""$newFilePath`"^"": $($_.Exception.Message)"^""; }; }; } catch { Write-Error "^""Failed to rename `"^""$originalFilePath`"^"" to `"^""$newFilePath`"^"": $($_.Exception.Message)"^""; $failedCount++; if ($accessGranted) { try { Set-Acl -Path $originalFilePath -AclObject $originalAcl -ErrorAction Stop; } catch { Write-Warning "^""Failed to restore access on `"^""$originalFilePath`"^"": $($_.Exception.Message)"^""; }; }; }; }; if (($renamedCount -gt 0) -or ($skippedCount -gt 0)) { Write-Host "^""Successfully processed $renamedCount items and skipped $skippedCount items."^""; }; if ($failedCount -gt 0) { Write-Warning "^""Failed to process $($failedCount) items."^""; }; [Privileges]::RemovePrivilege('SeRestorePrivilege') | Out-Null; [Privileges]::RemovePrivilege('SeTakeOwnershipPrivilege') | Out-Null"
Ijo6IFJlc3RvcmUgdGhlIHJlZ2lzdHJ5IHZhbHVlIFwiQWx0aXR1ZGVcIiBpbiBrZXkgXCJIS0xNXFxTWVNURU1cXEN1cnJlbnRDb250cm9sU2V0XFxTZXJ2aWNlc1xcV2RGaWx0ZXJcXEluc3RhbmNlc1xcV2R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Db3VudCAtZ3QgMCkgeyBXcml0ZS1XYXJuaW5nIFwiXlwiXCJGYWlsZWQgdG8gcHJvY2VzcyAkKCRmYWlsZWRDb3VudCkgaXRlbXMuXCJeXCJcIjsgfTsgW1ByaXZpbGVnZXNdOjpSZW1vdmVQcml2aWxlZ2UoJ1NlUmVzdG9yZVByaXZpbGVnZScpIHwgT3V0LU51bGw7IFtQcml2aWxlZ2VzXTo6UmVtb3ZlUHJpdmlsZWdlKCdTZVRha2VPd25lcnNoaXBQcml2aWxlZ2UnKSB8IE91dC1OdWxsXCIi
Help
How to apply or restore "Disable Defender Antivirus minifilter driver" using commands
- ≈ 2 min to complete
- Tools: Command Prompt
- Difficulty: Medium
- ≈ 3 instructions
- 1
Open Command Prompt
Open Command Prompt as Administrator. - 2
Copy code
Copy the code: - 3
Paste & run
Paste the commands into Command Prompt and press Enter to run.Some changes require a system restart to take effect
Similar Guides
Wider Goal
Guides below includes this guide to achieve a wider goal.See other more general settings that includes this one as one of its actions.These plans combine multiple privacy settings, including this one, for stronger protection.
- Disable system modification restrictions
- Disable Defender
- Privacy over security
This category disables features that restrict system modifications in Windows. This enables deeper system modifications, enhancing privacy by allowing th...
This category offers scripts to disable Windows security components related to Defender. Defender is also referred to as Microsoft Defender or Windows De...
Same Goal
Other guides in Disable system modification restrictions See settings that are in the same category as this guide.Using other actions in the same category may help you achieve your goal better.
About the Creators
These people have authored this documentation and written its scripts:
Reviewed By
This guide has undergone comprehensive auditing and peer review:Expert review by undergroundwires
- Verified technical accuracy and editorial standards
- Assessed system impact and user privacy risks
- Audited and verified using automated security tests
Public review by large community
- Privacy enthusiasts and professionals peer-reviewed
- Millions of end-users tested across different environments
- Audited and verified using third-party security software
History
We continually monitor our guides, their impact and other potential privacy options. We update our guides when new information becomes available. On every update, we publicly store who made the change, what has been changed, why the change was made and when the change was made.