PowerShell Enable-WindowsOptionalFeature Enables Suspicious Windows Optional Features (Windows)

Alerts on PowerShell enabling Windows optional features online for specific, potentially risky feature names.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2022-09-10
Updated
2026-07-31

What it detects

This rule flags PowerShell script blocks invoking the built-in cmdlet Enable-WindowsOptionalFeature with -Online and -FeatureName, specifically when targeting features listed as potentially suspicious. Attackers may enable unnecessary or legacy/remote-access capable Windows components to establish persistence, expand attack surface, or facilitate follow-on activity. The detection relies on Script Block Logging telemetry capturing the ScriptBlockText contents for the cmdlet and its feature name parameters.

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No changelog recorded for this version.2026-07-30

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