Table of Contents
Windows includes a new command line utility to enable and disable Windows features. The Deployment Image Servicing and Management tool (DISM) is perfect for IT professionals and power users that want to manage Windows components without using the GUI.
Manage Windows Optional Features Using Command Line
1. Type cmd in the seach box | From the result right click then select Run as administrator.
2. Command to list all features on your computer:
C:\Windows\System32>dism /online /get-features /format:table | more
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Image Version: 10.0.22621.1265
Features listing for package : Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.22621.1
------------------------------------------- | --------
Feature Name | State
------------------------------------------- | --------
Windows-Defender-Default-Definitions | Disabled
Printing-PrintToPDFServices-Features | Enabled
TFTP | Disabled
TIFFIFilter | Disabled
LegacyComponents | Disabled
...
3. List all enabled features:
C:\Windows\System32>dism /online /get-features /format:table | find "Enabled" | more
Printing-PrintToPDFServices-Features | Enabled
Printing-XPSServices-Features | Enabled
TelnetClient | Enabled
MSRDC-Infrastructure | Enabled
MicrosoftWindowsPowerShellV2Root | Enabled
...
4. List all disabled features:
C:\Windows\System32>dism /online /get-features /format:table | find "Disabled" | more
Windows-Defender-Default-Definitions | Disabled
TFTP | Disabled
TIFFIFilter | Disabled
LegacyComponents | Disabled
DirectPlay | Disabled
Windows-Identity-Foundation | Disabled
...
5. Get the status of a specific feature named: Telnet.
C:\Windows\System32>dism /online /get-features /format:table | find "Telnet" | more
TelnetClient | Enabled
6. Get details about the TelnetClient feature:
C:\Windows\System32>dism /online /get-featureinfo /featurename:TelnetClient
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Image Version: 10.0.22621.1265
Feature Information:
Feature Name : TelnetClient
Display Name : Telnet Client
Description : Allows you to connect to other computers remotely.
Restart Required : Possible
State : Enabled
Custom Properties:
ServerComponent\Description : Telnet Client uses the Telnet protocol to connect ...
ServerComponent\DisplayName : Telnet Client
ServerComponent\Id : 44
ServerComponent\Type : Feature
ServerComponent\UniqueName : Telnet-Client
ServerComponent\Version\Major : 10
ServerComponent\Version\Minor : 0
ServerComponent\Deploys\Update\Name : TelnetClient
The operation completed successfully.
7. Enable the TelnetClient feature:
C:\Windows\System32>dism /online /enable-feature /featurename:TelnetClient
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Image Version: 10.0.22621.1265
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
Manage Windows Optional Features Using PowerShell
1. Right click on the Windows Start icon 🪟 then select Windows PowerShell (Admin).
2. Using PowerShell to list all enabled features:
PS C:\WINDOWS\system32> get-windowsoptionalfeature -online | where state -like enabled* | ft | more
FeatureName State
----------- -----
Printing-PrintToPDFServices-Features Enabled
Printing-XPSServices-Features Enabled
TelnetClient Enabled
MSRDC-Infrastructure Enabled
MicrosoftWindowsPowerShellV2Root Enabled
MicrosoftWindowsPowerShellV2 Enabled
SimpleTCP Enabled
3. Show all features (enabled and disabled):
PS C:\WINDOWS\system32> get-windowsoptionalfeature -online | ft | more
FeatureName State
----------- -----
Windows-Defender-Default-Definitions Disabled
Printing-PrintToPDFServices-Features Enabled
Printing-XPSServices-Features Enabled
TelnetClient Enabled
TFTP Disabled
TIFFIFilter Disabled
...
4. Show information about TelnetClient feature:
PS C:\> get-windowsoptionalfeature -online -featurename *Telnet*
FeatureName : TelnetClient
DisplayName : Telnet Client
Description : Allows you to connect to other computers remotely.
RestartRequired : Possible
State : Enabled
CustomProperties :
ServerComponent\Description : Telnet Client uses ...
server and run applications on that server.
ServerComponent\DisplayName : Telnet Client
ServerComponent\Id : 44
ServerComponent\Type : Feature
ServerComponent\UniqueName : Telnet-Client
ServerComponent\Version\Major : 10
ServerComponent\Version\Minor : 0
ServerComponent\Deploys\Update\Name : TelnetClient
5. Disable TelnetClient feature:
PS C:\> disable-windowsoptionalfeature -online -featurename TelnetClient
Path :
Online : True
RestartNeeded : False
6. To enable TelnetClient feature but you are unsure about the feature name, first, use get-windowsoptionalfeaturename and pipe it with the enable-windowsoptionalfeaturename cmdlet.
PS C:\> get-windowsoptionalfeature -online -featurename *Telnet* | `
>> enable-windowsoptionalfeature -online -norestart
Path :
Online : True
RestartNeeded : False