List Windows Optional Features and Their State

Use Get-WindowsOptionalFeature -Online to see every optional Windows feature and whether it is Enabled, Disabled, or removed.

WindowssystempowershelldismLow risk
Run Get-WindowsOptionalFeature -Online in an admin PowerShell to list all feature names with their State; filter with Where-Object State -eq Enabled for only active ones.

01Command

Command
$ Get-WindowsOptionalFeature -Online | Sort-Object FeatureName | Format-Table FeatureName, State -AutoSize

02What it does

Optional features are components Windows can add or remove on demand — things like the Telnet client, .NET Framework 3.5, Hyper-V, or the Linux subsystem pieces. The graphical "Turn Windows features on or off" dialog shows them as a tree, but the command line gives you machine-readable output with exact names, which you need when enabling a feature by script. Each result's State tells you Enabled, Disabled, or EnabledWithPayloadRemoved (fully removed, needs a source to reinstall).

03Risk

RiskLow risk
RequirementsRun PowerShell as administrator — the -Online parameter needs elevation.
!Warning: Get-WindowsOptionalFeature -Online only works in an elevated PowerShell; without admin rights it fails with an access error. Never remove features you can't identify.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Enable-WindowsOptionalFeature
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: The companion cmdlet that turns a listed feature on, confirming State values map to enable/disable actions.
  • Get-WindowsOptionalFeature
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Get-WindowsOptionalFeature -Online lists all optional features in the running OS with their State (Enabled/Disabled) and requires an elevated session.

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions