Windows: PowerShell Enable-WindowsOptionalFeature Enables Suspicious Optional Features

Alerts on PowerShell Enable-WindowsOptionalFeature used with -Online to enable listed optional features.

FreeReviewedSigma · Medium · v1
Product
windows
Category
process_creation
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2022-12-29
Updated
2026-07-30

What it detects

This rule flags PowerShell process creation where the command line includes Enable-WindowsOptionalFeature with -Online and -FeatureName, and the feature name matches a set of potentially risky Windows optional features. Attackers can use Windows feature enablement to introduce new services or capabilities and expand persistence or access in environments where those components are not normally used. It relies on process creation telemetry, specifically the PowerShell command line contents.

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.