Microsoft Defender reference: Removes exclusions or default actions. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Remove-MpPreference. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / Defender · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-AllowDatagramProcessingOnWinServer
Indicates that the cmdlet removes whether to disable inspection of UDP connections on Windows Server.
-AllowNetworkProtectionDownLevel
Indicates that the cmdlet removes whether to allow network protection to be set to Enabled or Audit Mode on Windows versions before 1709.
-AllowNetworkProtectionOnWinServer
Indicates that the cmdlet removes whether to allow network protection to be set to Enabled or Audit Mode for Windows Server.
-AsJob
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell background jobs, see about_Jobs.
-AttackSurfaceReductionOnlyExclusions
Specifies the files and paths to exclude from Attack Surface Reduction (ASR) rules. Specify the folders or files and resources that should be excluded from ASR rules. Enter a folder path or a fully qualified resource name. For example, ""C:\Windows"" will exclude all files in that directory. ""C:\Windows\App.exe"" will exclude only that specific file in that specific folder. For more information about excluding files and folders from ASR rules.
-AttackSurfaceReductionRules_Actions
Specifies the states of attack surface reduction rules specified by using the AttackSurfaceReductionRules_Ids parameter. If you add multiple rules as a comma-separated list, specify their states separately as a comma-separated list.
-AttackSurfaceReductionRules_Ids
Specifies the states of attack surface reduction rules specified by using the AttackSurfaceReductionRules_Ids parameter. If you add multiple rules as a comma-separated list, specify their states separately as a comma-separated list.
-CheckForSignaturesBeforeRunningScan
Indicates that the cmdlet removes whether to check for new virus and spyware definitions before Windows Defender runs a scan.
-CimSession
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Prerequisites
Windows with the Defender module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 1: Remove a folder from the exclusion list
Remove-MpPreference -ExclusionPath "C:\Temp"
This command removes the folder C:\Temp from the exclusion list. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.
Specifies a cloud block level. This value determines how aggressive Microsoft Defender Antivirus is in blocking and scanning suspicious files.
-CloudExtendedTimeout
Specifies the amount of extended time to block a suspicious file and scan it in the cloud. Standard time is 10 seconds. Extend by up to 50 seconds.
-ControlledFolderAccessAllowedApplications
Specifies applications that can make changes in controlled folders.
-ControlledFolderAccessProtectedFolders
Specifies more folders to protect.
-DisableArchiveScanning
Indicates that the cmdlet removes whether to scan archive files, such as .zip and .cab files, for malicious and unwanted software.
-DisableAutoExclusions
Indicates that the cmdlet removes whether to disable the Automatic Exclusions feature for the server.
-DisableBehaviorMonitoring
Indicates that the cmdlet removes whether to enable behavior monitoring.
-DisableBlockAtFirstSeen
Indicates that the cmdlet removes whether to enable block at first seen.
-DisableCatchupFullScan
Indicates that the cmdlet removes whether Windows Defender runs catch-up scans for scheduled full scans.
-DisableCatchupQuickScan
Indicates that the cmdlet removes whether Windows Defender runs catch-up scans for scheduled quick scans.
-DisableCpuThrottleOnIdleScans
Indicates that the cmdlet removes whether the CPU will be throttled for scheduled scans while the device is idle.
-DisableDatagramProcessing
Indicates that the cmdlet removes whether to disable inspection of UDP connections.
-DisableDnsOverTcpParsing
Indicates that the cmdlet removes whether to disable inspection of DNS traffic that occurs over a TCP channel.
-DisableDnsParsing
Indicates that the cmdlet removes whether to disable inspection of DNS traffic that occurs over a UDP channel.
-DisableEmailScanning
Indicates that the cmdlet removes whether Windows Defender parses the mailbox and mail files, according to their specific format, in order to analyze mail bodies and attachments.
-DisableGradualRelease
Indicates that the cmdlet removes whether to disable gradual rollout of monthly and daily Windows Defender updates. If you enable this option, devices are offered all updates after the gradual release cycle finishes. Consider this option for datacenter computers that only receive limited updates. This setting applies to both monthly and daily updates. It overrides any previously configured channel selections for platform and engine updates. If you disable or do not configure this policy, the device remains in Current Channel (Default) unless specified otherwise in specific channels for platform and engine updates. The device stays up to date automatically during the gradual release cycle, which is suitable for most devices. This policy is available starting with platform version 4.18.2106.5 and later.
-DisableHttpParsing
Indicates that the cmdlet removes whether disable inspection of HTTP traffic. If EnableNetworkProtection has the value Enabled, HTTP connections to malicious websites can be blocked.
-DisableIOAVProtection
Indicates that the cmdlet removes whether Windows Defender scans all downloaded files and attachments.
-DisableInboundConnectionFiltering
Indicates that the cmdlet removes whether to inspect only outbound connections. By default, Network Protection inspects both inbound and outbound connections.
-DisableIntrusionPreventionSystem
Indicates that the cmdlet removes whether to configure network protection against exploitation of known vulnerabilities.
-DisablePrivacyMode
Indicates that the cmdlet removes whether to disable privacy mode.
-DisableRdpParsing
Indicates that the cmdlet removes whether to inspect only outbound connections. By default, Network Protection inspects both inbound and outbound connections.
-DisableRealtimeMonitoring
Indicates that the cmdlet removes whether to use real-time protection.
-DisableRemovableDriveScanning
Indicates that the cmdlet removes whether to scan for malicious and unwanted software in removable drives, such as flash drives, during a full scan.
-DisableRestorePoint
Indicates that the cmdlet removes whether to disable scanning of restore points.
-DisableScanningMappedNetworkDrivesForFullScan
Indicates that the cmdlet removes whether to scan mapped network drives. If you specify a value of $False or do not specify a value, Windows Defender scans mapped network drives.
-DisableScanningNetworkFiles
Indicates that the cmdlet removes whether to scan for network files.
-DisableScriptScanning
Indicates that the cmdlet removes whether to disable the scanning of scripts during malware scans. If you specify a value of $False or do not specify a value, Windows Defender does not scan scripts.
-DisableSshParsing
Indicates that the cmdlet removes whether to disable inspection of SSH traffic. By default, Network Protection inspects SSH traffic.
-DisableTlsParsing
Indicates that the cmdlet removes whether to disable inspection of TLS traffic, also known as HTTPS. By default, Network Protection inspects TLS traffic.
-EnableControlledFolderAccess
Indicates that the cmdlet removes the state for the controlled folder access feature. Valid values are Disabled, Enabled, and Audit Mode.
-EnableDnsSinkhole
Indicates that the cmdlet removes whether to examine DNS traffic to detect and sinkhole DNS exfiltration attempts and other DNS based malicious attacks.
-EnableFileHashComputation
Indicates that the cmdlet removes whether to enable file hash computation. When this feature is enabled, Windows Defender computes hashes for files it scans.
-EnableFullScanOnBatteryPower
Indicates that the cmdlet removes whether Windows Defender does a full scan while on battery power.
-EnableLowCpuPriority
Indicates that the cmdlet removes whether Windows Defender uses low CPU priority for scheduled scans.
-EnableNetworkProtection
Specifies how the Network Protection Service handles web-based malicious threats, including phishing and malware. Possible values are Disabled, Enabled, and AuditMode.
-EngineUpdatesChannel
Specifies when devices receive Microsoft Defender engine updates during the monthly gradual rollout. Valid values are: - NotConfigured. Devices stay up to date automatically during the gradual release cycle. This value is suitable for most devices. - Beta. Devices are the first to receive new updates. Select Beta Channel to participate in identifying and reporting issues to Microsoft. Devices in the Windows Insider Program are subscribed to this channel by default. This value is for use in manual test environments only and a limited number of devices. - Broad. Devices are offered updates only after the gradual release cycle completes. This value is suggested for a broad set of devices in your production population, from 10 to 100 percent. - Preview. Devices are offered updates earliest during the monthly gradual release cycle. This value is suggested for pre-production or validation environments. - Staged. Devices are offered updates after the monthly gradual release cycle. This value is suggested for a small, representative part of your production population, around 10 percent.
-ExclusionExtension
Specifies an array of file name extensions, such as obj or lib, to exclude from scheduled, custom, and real-time scanning. This cmdlet removes the exclusions that you specify.
-ExclusionIpAddress
Specifies an array of IP addresses to exclude from scheduled and real-time scanning.
-ExclusionPath
Specifies an array of file paths to exclude from scheduled and real-time scanning. This cmdlet removes the exclusions that you specify.
-ExclusionProcess
Specifies an array of processes, as paths to process images. This cmdlet removes exclusions of files opened by the processes that you specify.
-Force
Forces the command to run without asking for user confirmation.
-ForceUseProxyOnly
Removes whether to force the device to use only the proxy.
-HighThreatDefaultAction
Indicates that this cmdlet removes the automatic remediation action specified for the high threat alert level.
-LowThreatDefaultAction
Indicates that this cmdlet removes the automatic remediation action specified for the low threat alert level.
-MAPSReporting
Indicates that the cmdlet removes membership in Microsoft Active Protection Service.
-MeteredConnectionUpdates
Indicates that the cmdlet removes whether to update managed devices to update through metered connections. Data charges may apply.
-ModerateThreatDefaultAction
Indicates that this cmdlet removes the automatic remediation action specified for the moderate threat alert level.
-PUAProtection
Specifies the level of detection for potentially unwanted applications. When potentially unwanted software is downloaded or attempts to install itself on your computer, you are warned.
-PlatformUpdatesChannel
Specifies when devices receive Microsoft Defender platform updates during the monthly gradual rollout. Valid values are: - NotConfigured. Devices stay up to date automatically during the gradual release cycle. This value is suitable for most devices. - Beta. Devices are the first to receive new updates. Select Beta Channel to participate in identifying and reporting issues to Microsoft. Devices in the Windows Insider Program are subscribed to this channel by default. This value is for use in manual test environments only and a limited number of devices. - Broad. Devices are offered updates only after the gradual release cycle completes. This value is suggested for a broad set of devices in your production population, from 10 to 100 percent. - Preview. Devices are offered updates earliest during the monthly gradual release cycle. This value is suggested for pre-production or validation environments. - Staged. Devices are offered updates after the monthly gradual release cycle. This value is suggested for a small, representative part of your production population, around 10 percent.
-ProxyBypass
Specifies proxy bypasses.
-ProxyPacUrl
Specifies the Privilege Attribute Certificate (PAC) proxy.
-ProxyServer
Specifies the proxy server.
-QuarantinePurgeItemsAfterDelay
Indicates that the cmdlet removes specified number of days to keep items in the Quarantine folder.
-RandomizeScheduleTaskTimes
Indicates that the cmdlet removes whether to select a random time for the scheduled start and scheduled update for definitions.
-RealTimeScanDirection
Indicates that the cmdlet removes specified scanning configuration for incoming and outgoing files on NTFS volumes.
-RemediationScheduleDay
Indicates that the cmdlet removes specified day of the week on which to perform a scheduled full scan in order to complete remediation.
-RemediationScheduleTime
Indicates that the cmdlet removes specified time of day, as the number of minutes after midnight, to perform a scheduled scan.
-ReportingAdditionalActionTimeOut
Indicates that the cmdlet removes specified number of minutes before a detection in the additional action state changes to the cleared state.
-ReportingCriticalFailureTimeOut
Indicates that the cmdlet removes specified the number of minutes before a detection in the critically failed state changes to either the additional action state or the cleared state.
-ReportingNonCriticalTimeOut
Indicates that the cmdlet removes specified number of minutes before a detection in the non-critically failed state changes to the cleared state.
-ScanAvgCPULoadFactor
Indicates that the cmdlet removes specified maximum percentage CPU usage for a scan.
-ScanOnlyIfIdleEnabled
Indicates that the cmdlet removes whether to start scheduled scans only when the computer is not in use.
-ScanParameters
Indicates that the cmdlet removes specified scan type to use during a scheduled scan.
-ScanPurgeItemsAfterDelay
Indicates that the cmdlet removes specified number of days to keep items in the scan history folder.
-ScanScheduleDay
Indicates that the cmdlet removes specified the day of the week on which to perform a scheduled scan.
-ScanScheduleQuickScanTime
Indicates that the cmdlet removes specified time of day, as the number of minutes after midnight, to perform a scheduled quick scan.
-ScanScheduleTime
Indicates that the cmdlet removes specified time of day, as the number of minutes after midnight, to perform a scheduled scan.
-SchedulerRandomizationTime
Specifies the randomization time for the scheduler.
-SevereThreatDefaultAction
Indicates that this cmdlet removes the automatic remediation action specified for the severe threat alert level.
-SharedSignaturesPath
Specifies the shared signatures path.
-SignatureAuGracePeriod
Indicates that the cmdlet removes specified grace period, in minutes, for the definition.
-SignatureBlobFileSharesSources
Specifies the file shares sources for signatures.
-SignatureBlobUpdateInterval
Indicates that the cmdlet removes the signature update interval.
-SignatureDefinitionUpdateFileSharesSources
Indicates that the cmdlet removes specified file-share sources for definition updates.
-SignatureDisableUpdateOnStartupWithoutEngine
Indicates that the cmdlet removes whether to initiate definition updates even if no antimalware engine is present.
-SignatureFallbackOrder
Indicates that the cmdlet removes specified order in which to contact different definition update sources.
-SignatureFirstAuGracePeriod
Indicates that the cmdlet removes specified grace period, in minutes, for the definition.
-SignatureScheduleDay
Indicates that the cmdlet removes specified day of the week on which to check for definition updates.
-SignatureScheduleTime
Indicates that the cmdlet removes specified time of day, as the number of minutes after midnight, to check for definition updates.
-SignatureUpdateCatchupInterval
Indicates that the cmdlet removes specified number of days after which Windows Defender requires a catch-up definition update.
-SignatureUpdateInterval
Indicates that the cmdlet removes specified interval at which to check for definition updates.
-SignaturesUpdatesChannel
Specifies when devices receive daily Microsoft Defender definition updates during the monthly gradual rollout. Valid values are: - NotConfigured. Devices stay up to date automatically during the gradual release cycle. This value is suitable for most devices. - Broad. Devices are offered updates only after the gradual release cycle completes. This value is suggested for a broad set of devices in your production population, from 10 to 100 percent. - Staged. Devices are offered updates after the monthly gradual release cycle. This value is suggested for a small, representative part of your production population, around 10 percent. This parameter name will be updated to DefinitionUpdatesChannel in a future release.
-SubmitSamplesConsent
Indicates that the cmdlet removes how Windows Defender checks for user consent for certain samples.
-ThreatIDDefaultAction_Actions
Specifies an array of actions to remove for the threat IDs specified by using the ThreatIDDefaultAction_Ids parameter. Valid values are: - Clean - Quarantine - Remove - Allow - UserDefined - NoAction - Block - None
-ThreatIDDefaultAction_Ids
Specifies an array of threat IDs. This cmdlet removes the default actions for the threat IDs that you specify.
-ThrottleLimit
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
-UILockdown
Indicates that the cmdlet removes whether to disable UI lockdown mode.
-UnknownThreatDefaultAction
Indicates that this cmdlet removes the automatic remediation action specified for the unknown threat alert level.