
Security News
Node.js Considers Public Workflow for Security Reports Amid AI-Driven Surge
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.
py-win-mp-exclude
Advanced tools
py-win-mp-exclude is a Windows package for adding, removing, and listing
Microsoft Defender path exclusions from a CLI, a small GUI, or Python code.
The tool uses PowerShell's Defender cmdlets:
Add-MpPreference -ExclusionPathRemove-MpPreference -ExclusionPathGet-MpPreferenceWhen a CLI subcommand or the GUI starts without administrator privileges, the
program relaunches itself once through
py-admin-launch. A hidden startup
flag prevents repeated elevation attempts. --dry-run commands only print the
PowerShell script and do not request elevation.
pip install py-win-mp-exclude
Add a file or folder exclusion:
win-mp-exclude add C:\path\to\file.exe
win-mp-exclude add C:\path\to\folder
Remove a file or folder exclusion:
win-mp-exclude remove C:\path\to\file.exe
win-mp-exclude remove C:\path\to\folder
List configured path exclusions:
win-mp-exclude list
Preview the PowerShell command without running it:
win-mp-exclude --dry-run add C:\path\to\folder
The package also installs the alias py-win-mp-exclude.
Launch the graphical interface:
win-mp-exclude-gui
The GUI can add exclusions, remove exclusions, remove a selected exclusion, list
current exclusions, and refresh the list. The package also installs the alias
py-win-mp-exclude-gui.
The Python API exposes the same add, remove, list, and dry-run capabilities used by the CLI and GUI:
from win_mp_exclude import add_exclusion, list_exclusions, remove_exclusion
add_result = add_exclusion(r"C:\path\to\folder")
print(add_result.message)
for path in list_exclusions().exclusions:
print(path)
remove_result = remove_exclusion(r"C:\path\to\folder")
print(remove_result.message)
Use dry_run=True to inspect the PowerShell script without applying a change:
from win_mp_exclude import add_exclusion
result = add_exclusion(r"C:\path\to\folder", dry_run=True)
print(result.script)
By default, Python mutating calls can request administrator elevation once. Pass
elevate=False if your program wants to handle elevation itself.
Build with Poetry:
poetry build
Publish with Poetry:
poetry publish
FAQs
Manage Microsoft Defender path exclusions from Python, CLI, or GUI.
The pypi package py-win-mp-exclude receives a total of 0 weekly downloads. As such, py-win-mp-exclude popularity was classified as not popular.
We found that py-win-mp-exclude demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.