Set-ProcessMitigation: -Remove does not remove path-scoped entries created with a full -Name path

Open Beginner friendly
#4,143 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
powershell
Domain
documentation

Research direction

Open docset/winserver2025-ps/ProcessMitigations/Set-ProcessMitigation.md and locate the -Name parameter description and the -Remove examples (e.g. Set-Processmitigation -Name test.exe -Remove -Disable DEP). Add a note stating that when -Name is a full path, the entry is path-scoped and must be deleted under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<name>. Done means the same note appears in the 2025, 2022, and 2019 docset copies of the page and the Markdown builds without lint errors.

Written by the indexing model from the issue text.

Description

Page: docset/winserver2025-ps/ProcessMitigations/Set-ProcessMitigation.md (same text in the 2022 and 2019 docsets); also https://learn.microsoft.com/defender-endpoint/enable-exploit-protection

The page documents -Name as <ProcessPathAndFilename.exe> and shows removal as Set-Processmitigation -Name test.exe -Remove -Disable DEP. When -Name is a full path, the cmdlet creates a path-scoped entry (UseFilter=1 on the IFEO key plus a subkey with FilterFullPath), but none of the documented removal forms delete it:

  • -Remove alone: error "Invalid input parameters".
  • -Remove -Disable <mitigation>: succeeds silently, entry unchanged.

Reproduction (elevated PowerShell 7.6 or Windows PowerShell 5.1, Windows 11 Pro 26300, ProcessMitigations module 1.0.12):

Set-ProcessMitigation -Name C:\test\app.exe -Disable ForceRelocateImages
Get-ProcessMitigation -Name C:\test\app.exe   # ForceRelocateImages: OFF; registry has UseFilter + FilterFullPath subkey
Set-ProcessMitigation -Name C:\test\app.exe -Remove                                 # Invalid input parameters
Set-ProcessMitigation -Name C:\test\app.exe -Remove -Disable ForceRelocateImages    # no error, entry still present
Get-ProcessMitigation -Name C:\test\app.exe   # still OFF

-Reset and -Force off also fail with "Invalid input parameters"; -Remove -Enable ForceRelocateImages and a bare-name -Name app.exe -Remove -Disable ForceRelocateImages succeed without removing the entry. Deleting the subkey under the IFEO key by hand is the only way to undo the exemption.

Either the cmdlet should remove such entries, or the page should state that path-scoped entries must be removed from HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<name> directly.

Also filed in feedback hub: feedback-hub:?contextid=871&feedbackid=c3ac56ef-2214-40a3-96d2-cbed787ec578&form=1&src=1

Dominant language
Dockerfile
Stars
510
Forks
643
Avg merge
2d 21h
Merged PRs (30d)
8

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MicrosoftDocs/windows-powershell-docs

All issues in MicrosoftDocs/windows-powershell-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.