<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Implementing Application Whitelisting

## Application Whitelisting APIs

### AppLocker PowerShell Cmdlets

| Cmdlet | Description |
|---|---|
| `Get-AppLockerPolicy -Effective` | Get currently enforced policy |
| `Set-AppLockerPolicy -XmlPolicy <path>` | Apply XML policy |
| `Get-AppLockerFileInformation -Path <exe>` | Get publisher/hash info for a file |
| `Test-AppLockerPolicy -XmlPolicy <path> -Path <exe>` | Test if a file would be allowed |
| `New-AppLockerPolicy -FileInformation <info>` | Generate policy from file information |

### WDAC PowerShell Cmdlets

| Cmdlet | Description |
|---|---|
| `New-CIPolicy` | Create a new Code Integrity policy |
| `Merge-CIPolicy` | Merge multiple policies |
| `ConvertFrom-CIPolicy` | Convert XML to binary format |
| `Set-RuleOption` | Configure policy options (audit mode, etc.) |

### Agent Script

```bash
# Export AppLocker policy
node agent.js get-policy

# Check enforcement events
node agent.js check-events --max-events 50

# Verify AppIDSvc
node agent.js check-service
```
