DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › DISM

How to Find and Use Windows Features with PowerShell (Windows 10 and 11)

By Freedom251 Team · · 12 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find Windows capabilities

Capabilities have their own discovery cmdlet. To list capabilities available to or installed in the running operating system, run:

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Safer repeatable administration

Discover, decide, then change

  1. Open an elevated PowerShell session.
  2. Identify whether the target is the running OS or a mounted image.
  3. Run the matching discovery cmdlet: Get-WindowsOptionalFeature or Get-WindowsCapability.
  4. Copy the exact returned name and confirm that it belongs to the intended target.
  5. Choose the corresponding enable, disable, or add operation.
  6. Choose source behavior before running a capability install or a restore that may need payload files.
  7. Read the result, note any restart indication, and restart only when appropriate for the maintenance window.
  8. 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.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

DISMOptional FeaturesPowerShellsystem administrationWindows 10Windows 11Windows capabilities

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.