Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Use PowerShell to discover the exact item name on the Windows installation you intend to change, then run the matching cmdlet in an elevated session. Optional features use Get-WindowsOptionalFeature and Enable-WindowsOptionalFeature; Windows capabilities use Get-WindowsCapability and Add-WindowsCapability. The same cmdlets can target the running system with -Online or a mounted image with -Path.
The phrase “only available through PowerShell” needs qualification. Windows 10 and Windows 11 expose some optional-feature management in Settings, and DISM.exe provides corresponding servicing operations. PowerShell is valuable when you need exact names, repeatable commands, offline-image servicing, source control, or automation.
As an Amazon Associate I earn from qualifying purchases.
Optional features and capabilities are different things
Windows uses two related but separate servicing concepts. An optional feature is a Windows component that can be enabled or disabled. A capability is a package that can be installed into the operating system, often from Windows Update, WSUS, or a Features on Demand source. Their names and cmdlets are not interchangeable.
| What you are managing | Discover it with | Change it with | Typical target parameter |
|---|---|---|---|
| Optional feature | Get-WindowsOptionalFeature |
Enable-WindowsOptionalFeature or Disable-WindowsOptionalFeature |
-Online for the running OS or -Path for a mounted image |
| Capability package | Get-WindowsCapability |
Add-WindowsCapability |
-Online for the running OS or -Path for a mounted image |
Always query the target first and copy the name returned by that query. A label shown in Settings, a feature name, and a full capability package name may look similar while requiring different commands.
#1 Best Overall
Before you change anything
Use an elevated PowerShell session
Feature and capability servicing changes the operating-system image. Open Windows PowerShell or PowerShell with Run as administrator. Without elevation, discovery may be limited and state-changing commands can fail with an access or servicing error.
Know which image you are targeting
-Online means the currently running Windows installation; it does not merely mean “connected to the internet.” Use -Path when servicing a Windows image mounted at a local directory. The path must identify the mounted image you intend to modify.
Confirm edition and build
Feature and capability availability depends on the Windows edition, build, image contents, and servicing configuration. Microsoft’s cmdlet reference includes Windows client and Windows Server views, but a command that exists on one release does not guarantee that the requested component exists on every edition. Query the actual target rather than relying on a name copied from another computer.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePlan for a restart
Windows reports feature state and whether a restart might be required after a change. Treat a restart indication as part of the operation: save work, schedule the reboot, and do not assume the feature is usable until the system has completed any required restart.
Find optional features in the running Windows installation
Start with an inventory of optional features:
Get-WindowsOptionalFeature -Online
The output describes optional features known to the running operating-system image. To narrow the result to names containing a word such as Hyper-V, use the feature-name filter:
Get-WindowsOptionalFeature -Online -FeatureName *Hyper-V*
Use the exact feature name returned by this command in later operations. The wildcard is for discovery; it is not a substitute for confirming the precise name before enabling or disabling anything.
Read the discovery result before acting
Discovery is not just a way to search for spelling. It confirms that the component exists in the selected image and shows its current servicing state. Review the matching entries, make sure the target is the expected installation, and check whether Windows indicates that a restart may be needed after a state change. If the command returns no matching feature, do not guess at a name copied from another release.
Recommended Free Tools
Inspect an offline image instead
Mount the Windows image first, then replace -Online with its mount path:
Get-WindowsOptionalFeature -Path C:MountWindows
To filter an offline image, apply the same pattern to the mounted target:
Get-WindowsOptionalFeature -Path C:MountWindows -FeatureName *Hyper-V*
These commands inspect the mounted image, not the operating system currently running the PowerShell window. That distinction matters when you are preparing deployment media or repairing another installation.
Enable an optional feature
After discovery, enable the feature by supplying the returned name:
Enable-WindowsOptionalFeature -Online -FeatureName <feature-name>
Replace <feature-name> with the literal name from Get-WindowsOptionalFeature. Do not copy a friendly display label unless it is also the returned feature name.
Rank #2
Enable parent features with -All
Some features depend on parent features. The -All switch tells the cmdlet to enable the required parent features as well:
Enable-WindowsOptionalFeature -Online -FeatureName <feature-name> -All
Use this when the dependency chain is intended. Review the command and its output before accepting a broader change than the single feature you originally selected.
Enable a feature in an offline image
Enable-WindowsOptionalFeature -Path C:MountWindows -FeatureName <feature-name> -All
Offline servicing changes the mounted image. It does not activate the feature on the computer running PowerShell.
Source availability and restore operations
If Windows needs payload files that are not present locally, the operation may require a servicing source. Source controls also apply to restore scenarios documented for the optional-feature cmdlet. Use a source that matches the target image and keep the source available for the duration of the operation. If the requested payload cannot be found, stop and correct the source rather than repeatedly rerunning the same command.
A source should correspond to the target Windows release and architecture. A package from a different build can be unavailable to the image or cause servicing failure. In managed environments, coordinate source access with the organization’s update and servicing policy before starting a change.
Disable an optional feature—and understand -Remove
To disable an optional feature while retaining its files in the image, run:
Disable-WindowsOptionalFeature -Online -FeatureName <feature-name>
Disabling changes the feature’s state but is not the same as deleting its payload.
Free tools Windows power users keep installed
One-click scans. No signup required.
Remove feature files to reduce the image
Add -Remove when you also want Windows to remove the feature files while preserving the feature manifest:
Disable-WindowsOptionalFeature -Online -FeatureName <feature-name> -Remove
A removed feature can later be restored from a remote or other servicing source. Because restoration depends on having suitable source files, use -Remove only when you have a plan for that source and accept the extra recovery step.
Use ordinary disabling when you expect to re-enable the component without retrieving its payload again. Use removal only when reducing the image’s stored files is worth the additional source and recovery requirement.
Disable a feature in an offline image
Disable-WindowsOptionalFeature -Path C:MountWindows -FeatureName <feature-name>
The same -Remove distinction applies when the target is a mounted image.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Find Windows capabilities
Capabilities have their own discovery cmdlet. To list capabilities available to or installed in the running operating system, run:
Rank #3
Get-WindowsCapability -Online
The output contains the full capability package names. Copy that complete name—including its version-style suffix—when installing. A capability name cannot be substituted for an optional-feature name.
Use the capability inventory as the authority
A capability may be listed as installed or available in the target image. Use the returned package identity rather than shortening it to a language, architecture, or display-name fragment. If the expected capability does not appear, verify the image, release, and servicing configuration before trying a different command family.
Inspect capabilities in an offline image
Get-WindowsCapability -Path C:MountWindows
This queries the mounted image’s capability inventory. It is useful when preparing a reference image or determining whether a package is already present before deployment.
Install a capability package
Install a capability in the running OS with the exact full name returned by discovery:
Add-WindowsCapability -Online -Name <full-capability-name>
When no source is supplied, Microsoft’s example behavior uses the Windows Update client to obtain the required package. That requires an active internet connection or an active connection to the local WSUS server.
Use an explicit package source
If the capability files are stored locally or on approved installation media, specify that location:
Add-WindowsCapability -Online -Name <full-capability-name> -Source D:FoD
The source must contain packages appropriate for the target Windows release and architecture. A source from a different build can leave the package unavailable or cause servicing failure.
Prevent Windows Update from being queried
Add -LimitAccess when the operation must use only the supplied source:
Add-WindowsCapability -Online -Name <full-capability-name> -Source D:FoD -LimitAccess
-LimitAccess changes source behavior: the cmdlet will not query Windows Update for source packages. Use it in controlled or disconnected environments only when the explicit source is complete.
Without -LimitAccess, source resolution can include Windows Update according to the system’s servicing policy. Decide deliberately whether network retrieval is permitted; otherwise a command that appears to use local media may still attempt an external source when the local package is incomplete.
Install a capability into an offline image
Add-WindowsCapability -Path C:MountWindows -Name <full-capability-name> -Source D:FoD -LimitAccess
For an offline target, provide the mounted image path. If the source is omitted, package acquisition depends on the servicing configuration for that image; an explicit, matching source is generally easier to reason about in deployment work.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Verify the result after servicing
After an enable, disable, removal, or capability installation completes, query the same target again with the corresponding Get- cmdlet. This confirms that you are checking the image you actually changed and lets you compare the reported state with the intended result. For an offline image, continue using its -Path; do not switch to -Online unless you mean to inspect the running computer.
Rank #4
Read the operation output for a restart indication. A successful command does not necessarily mean the component is ready for use immediately. Complete any required restart during the planned maintenance window, then perform the verification query again.
Choose the right workflow
| Decision | Use this approach | Why it matters |
|---|---|---|
| Running computer or mounted image? | -Online for the running OS; -Path for a mounted image |
Prevents changes from being applied to the wrong installation |
| Optional feature or capability? | Optional-feature cmdlets for features; capability cmdlets for packages | The naming schemes and operations are separate |
| Need parent dependencies? | Add -All to Enable-WindowsOptionalFeature |
Enables required parent features along with the selected feature |
| Keep payload files or remove them? | Disable without -Remove to keep files; add -Remove to delete files |
Removal reduces local payload but makes later restoration source-dependent |
| Where should capability files come from? | Omit -Source for Windows Update/WSUS behavior, or provide -Source |
Network policy and source completeness determine whether installation can succeed |
| Must Windows Update be avoided? | Use an explicit source with -LimitAccess |
Stops the cmdlet from querying Windows Update for source packages |
Common failures and how to correct them
“Access denied” or a permission failure
Close the current window, start PowerShell with administrative rights, and rerun the discovery command. Elevation is required for the servicing operations described here.
The name is not recognized
Run the appropriate discovery cmdlet against the same target you plan to change. Check whether you accidentally used a capability name with an optional-feature cmdlet, or copied a display label instead of the returned name. For an offline operation, confirm that -Path points to the mounted image rather than the live system.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsThe capability cannot be downloaded
When no source is specified, verify internet or WSUS connectivity and the organization’s update policy. If network retrieval is not allowed, provide a matching package source. If you used -LimitAccess, remove it only when policy permits Windows Update and the explicit source is incomplete.
The feature is enabled but does not work yet
Read the command output and the reported restart indication. Complete the required restart before testing the component. If the operation requested parent features with -All, verify that the resulting state matches the intended dependency chain.
A removed feature must be restored
Because -Remove deletes feature files while retaining the manifest, restoration requires a suitable remote or other servicing source. Supply that source when performing the restore operation and ensure it matches the target image.
The command changed the wrong installation
This usually means -Online was used when the intended target was a mounted image, or that the mount path was incorrect. Recheck the target before every state-changing command. Discovery and change commands should use the same target parameter.
Free tools Windows power users keep installed
One-click scans. No signup required.
Safer repeatable administration
Discover, decide, then change
- Open an elevated PowerShell session.
- Identify whether the target is the running OS or a mounted image.
- Run the matching discovery cmdlet:
Get-WindowsOptionalFeatureorGet-WindowsCapability. - Copy the exact returned name and confirm that it belongs to the intended target.
- Choose the corresponding enable, disable, or add operation.
- Choose source behavior before running a capability install or a restore that may need payload files.
- Read the result, note any restart indication, and restart only when appropriate for the maintenance window.
- Run the matching discovery command again to verify the final state.
Keep optional-feature and capability scripts separate
A script that enables an optional feature should not silently switch to Add-WindowsCapability when a name is missing. Treat the two inventories as separate inputs and fail the script when the expected name is not returned. This avoids installing a similarly named but different package.
Use offline servicing deliberately
Offline commands are appropriate for image preparation, not for changing the live computer by accident. Record the mount path, source location, target Windows release, and whether the operation is intended to include parent features or remove payload files.
Make source decisions explicit
For repeatable deployment, document whether package retrieval is expected from Windows Update, WSUS, or a supplied source. If the environment must remain disconnected, pair a complete source with -LimitAccess. If the source is incomplete, correct it before execution rather than relying on an unintended fallback.
What “PowerShell-only” really means
Microsoft’s client-management guidance says some optional features can be added or removed in Settings and also documents PowerShell for enabling or disabling specific features. Microsoft’s DISM mapping documentation states that DISM PowerShell cmdlets perform the same functions as corresponding Dism.exe commands. Therefore, PowerShell should be understood as the precise, scriptable management route—not proof that every Windows feature is exposed exclusively through PowerShell.
PowerShell becomes the practical choice when the graphical interface does not expose the required detail, when you need to inspect exact package names, when you are servicing an offline image, or when the same change must be repeated consistently across systems.
Best Value
Version, edition, and support boundaries
The client-management guidance discussed here applies to Windows 10 and Windows 11. The cmdlet reference also covers Windows Server releases, including Server 2025 and Server 2022, but available features and capabilities vary by release and image. There is no universal inventory that applies to every Windows edition, build, architecture, or servicing policy.
Before deployment, validate the commands on the actual build, use the target’s own discovery output, and obtain package sources that correspond to that image. If a capability or optional feature is absent from the inventory, do not infer that a different spelling or a command for the other management type will install it.
Frequently Asked Questions
Are Windows features available only through PowerShell?
No. Windows 10 and Windows 11 expose some optional-feature management in Settings, and DISM.exe provides corresponding servicing operations. PowerShell is the detailed, scriptable route for exact names, repeatable changes, and offline-image work.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWhat is the difference between an optional feature and a capability?
Optional features are managed with the Get-WindowsOptionalFeature, Enable-WindowsOptionalFeature, and Disable-WindowsOptionalFeature cmdlets. Capabilities are packages discovered with Get-WindowsCapability and installed with Add-WindowsCapability. Their names and commands are not interchangeable.
What does the -Online parameter mean?
It targets the currently running Windows installation. It does not mean that the command must use the internet. Use -Path instead when the target is a mounted offline image.
Why must I copy the full capability name?
The capability inventory returns the package identity expected by Add-WindowsCapability, including its version-style suffix. A shortened display label or an optional-feature name may not identify the package.
Does Add-WindowsCapability require an internet connection?
When no source is supplied, Microsoft documents Windows Update client retrieval, which requires an active internet connection or an active connection to the local WSUS server. You can instead provide a matching package source.
What does -LimitAccess do?
It prevents Add-WindowsCapability from querying Windows Update for source packages. Use it with a complete, matching explicit source when network retrieval is not permitted or the operation must remain disconnected.
What is the difference between disabling a feature and using -Remove?
Disabling changes the feature state while retaining its files. Adding -Remove deletes the feature files while preserving the manifest, so restoring the feature later requires a suitable remote or other servicing source.
Do I need administrator rights?
Run the commands in an elevated PowerShell session with Run as administrator. Servicing changes the operating-system image and can fail with an access or servicing error without elevation.
Can I use a capability name with Enable-WindowsOptionalFeature?
No. Query the target with the matching discovery cmdlet and use the corresponding operation. Optional-feature names belong to optional-feature cmdlets; capability package names belong to capability cmdlets.
How do I know whether a restart is required?
Read the result from the feature operation. Windows reports feature state and whether a restart might be required. Complete the restart during the planned maintenance window, then query the target again.
The Bottom Line
Discover first, use the exact name returned for the target image, and match the command to the object: optional features use the optional-feature cmdlets, while capabilities use the capability cmdlets. Run elevated, choose -Online or -Path deliberately, plan the package source, distinguish disabling from removal, and account for any restart indication.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

