Metadata-Version: 2.4
Name: py-win-mp-exclude
Version: 0.1.0
Summary: Manage Microsoft Defender path exclusions from a Windows command line.
License-Expression: MIT
License-File: LICENSE
Keywords: windows,defender,microsoft-defender,exclusions,powershell
Author: GGN_2015
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Dist: py-admin-launch (>=0.1.3,<0.2.0)
Project-URL: Repository, https://github.com/GGN-2015/py-win-mp-exclude
Description-Content-Type: text/markdown

# py-win-mp-exclude

`py-win-mp-exclude` is a Windows command line tool for adding, removing, and
listing Microsoft Defender path exclusions.

The tool uses PowerShell's Defender cmdlets:

- `Add-MpPreference -ExclusionPath`
- `Remove-MpPreference -ExclusionPath`
- `Get-MpPreference`

When an `add` or `remove` command starts without administrator privileges, the
program relaunches itself once through
[`py-admin-launch`](https://pypi.org/project/py-admin-launch/). A hidden startup
flag prevents repeated elevation attempts.

## Installation

```powershell
pip install py-win-mp-exclude
```

## Usage

Add a file or folder exclusion:

```powershell
win-mp-exclude add C:\path\to\file.exe
win-mp-exclude add C:\path\to\folder
```

Remove a file or folder exclusion:

```powershell
win-mp-exclude remove C:\path\to\file.exe
win-mp-exclude remove C:\path\to\folder
```

List configured path exclusions:

```powershell
win-mp-exclude list
```

Preview the PowerShell command without running it:

```powershell
win-mp-exclude --dry-run add C:\path\to\folder
```

The package also installs the alias `py-win-mp-exclude`.

## Development

Build with Poetry:

```powershell
poetry build
```

Publish with Poetry:

```powershell
poetry publish
```

