Enable a Windows Optional Feature from the Command Line
Turn on optional Windows features like the Telnet client or .NET 3.5 with Enable-WindowsOptionalFeature or DISM /enable-feature.
01Command
$ Enable-WindowsOptionalFeature -Online -FeatureName TelnetClient -NoRestart02What it does
The feature names you pass here are the exact names shown by Get-WindowsOptionalFeature -Online, not the friendly names in the dialog — TelnetClient, Microsoft-Windows-Subsystem-Linux, NetFx3 and so on. Add -All to pull in the feature's parent dependencies, and -NoRestart if you don't want the machine to reboot automatically when the feature requests it. Features whose payload was removed (like .NET 3.5 on some installs) need -Source pointing at installation media or Windows Update.
03Risk
04Undo
$ Disable-WindowsOptionalFeature -Online -FeatureName TelnetClient05Sources
- Enable-WindowsOptionalFeatureEvidence: Documents Enable-WindowsOptionalFeature -Online -FeatureName <name> with -NoRestart, -All and -Source parameters for enabling optional features.
- DISM Operating System Package Servicing Command-Line OptionsEvidence: The equivalent DISM syntax (dism /online /enable-feature /featurename:<name>) for environments that use the DISM tool directly.
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
Use the System File Checker to verify every protected Windows system file against known-good copies and automatically replace the damaged ones.
Use Windows Package Manager to install, search, and upgrade thousands of applications from the community repository in one command.
Diagnose NTFS file system errors and bad sectors on any volume — including the system drive while Windows is running — before committing to a repair.