Windows Defender expone una API completa de PowerShell a través del módulo Defender. Permite forzar análisis, consultar el historial de amenazas, gestionar exclusiones y actualizar definiciones, todo desde la consola sin abrir la interfaz gráfica.
Get-MpComputerStatus | Select-Object AMRunningMode, AntivirusEnabled, RealTimeProtectionEnabled, AntivirusSignatureLastUpdated
Get-MpThreatDetection | Sort-Object InitialDetectionTime -Descending | Select-Object -First 10
Get-MpThreat | Where-Object {$_.IsActive -eq $false}
Start-MpScan -ScanType QuickScan
Start-MpScan -ScanType CustomScan -ScanPath "C:\Descargas"
Update-MpSignature
Add-MpPreference -ExclusionPath "C:\MisProyectos\build"