Sigma rule: Disable-WindowsOptionalFeature Command PowerShell

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-b2c2e12d7f72, updated 2022-09-10T00:00:00.000Z.

Rule

Title
Disable-WindowsOptionalFeature Command PowerShell
Status
test
Level
high
Author
frack113
Date
2022-09-10
File
rules/windows/powershell/powershell_script/posh_ps_disable_windows_optional_feature.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detect built in PowerShell cmdlet Disable-WindowsOptionalFeature, Deployment Image Servicing and Management tool.
Similar to DISM.exe, this cmdlet is used to enumerate, install, uninstall, configure, and update features and packages in Windows images

Log source

product
windows
category
ps_script
definition
Requirements: Script Block Logging must be enabled

Detection

selection_cmd:
    ScriptBlockText|contains|all:
        - 'Disable-WindowsOptionalFeature'
        - '-Online'
        - '-FeatureName'
selection_feature:
    # Add any important windows features
    ScriptBlockText|contains:
        - 'Windows-Defender-Gui'
        - 'Windows-Defender-Features'
        - 'Windows-Defender'
        - 'Windows-Defender-ApplicationGuard'
        # - 'Containers-DisposableClientVM' # Windows Sandbox
condition: all of selection*

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.defense-impairment
  • attack.t1685

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_disable_windows_optional_feature.yml

Sources and licences

  • SigmaHQ

    "Disable-WindowsOptionalFeature Command PowerShell" by frack113 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_disable_windows_optional_feature.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Disable-WindowsOptionalFeature Command PowerShell",
entity page, dataset version ref-b2c2e12d7f72, updated 2022-09-10T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/99c4658d-2c5e-4d87-828d-7c066ca537c3 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 99c4658d-2c5e-4d87-828d-7c066ca537c3, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.