PowerShell does not make Windows features exist: Windows 10 and 11 also provide Settings routes for adding and removing optional features. Its advantage is making feature discovery, installation, and image servicing more searchable and repeatable. These four workflows show what you can do from an elevated PowerShell session—and where the feature model or Windows edition matters.
1. Find optional features in Windows or an offline image
Settings is convenient when you already know what you want to turn on. PowerShell is more useful when you need to inspect what a Windows installation offers, filter a long list, or check an image before deployment. Microsoft documents Get-WindowsOptionalFeature for both the running operating system and an offline image. Microsoft’s cmdlet reference includes examples for listing features and searching for Hyper-V.
As an Amazon Associate I earn from qualifying purchases.
Query the running PC
Open PowerShell as an administrator, then run:
Get-WindowsOptionalFeature -Online
To narrow the output to feature names matching Hyper-V, use a wildcard:
Free tools Windows power users keep installed
One-click scans. No signup required.
Get-WindowsOptionalFeature -Online -FeatureName *Hyper-V*
The command reports feature information, including its state. The name returned by the query is the name to use with an enable or disable command; do not assume that a friendly label in Settings is the command’s feature name.
#1 Best Overall
Query a mounted image
For an offline Windows image, provide its mount path with -Path rather than targeting the running OS with -Online:
Get-WindowsOptionalFeature -Path C:MountWindows
Replace the example path with the actual Windows directory of the mounted image. This lets administrators check image contents before deploying them, without changing the currently running PC.
2. Enable a feature, dependencies, or restore files
After discovering the feature name, Enable-WindowsOptionalFeature can turn it on. The -All switch also enables parent features and default dependencies, which can otherwise cause an installation to fail because a required component is off. Run feature-management commands in an elevated PowerShell session. Microsoft’s Enable-WindowsOptionalFeature reference documents online and offline targets as well as source options.
Rank #2
Enable a feature in the running OS
Enable-WindowsOptionalFeature -Online -FeatureName <FeatureName> -All
Replace <FeatureName> with the exact name found by the query. Windows may require a restart for the state change to take effect; follow the command’s result and restart prompt rather than assuming the feature is ready immediately.
Use a local source when files are unavailable
If Windows needs files to restore or enable a feature, specify a source directory that contains the required files:
Enable-WindowsOptionalFeature -Online -FeatureName <FeatureName> -All -Source D:SourcesWindows
Use a source that matches the target Windows installation. Add -LimitAccess if you want to prevent the operation from contacting Windows Update for source files:
Rank #3
Enable-WindowsOptionalFeature -Online -FeatureName <FeatureName> -All -Source D:SourcesWindows -LimitAccess
That switch does not supply missing files itself; the specified source must be usable. For an offline image, use its mount path instead of -Online.
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 match3. Enable Hyper-V from PowerShell
Hyper-V is an optional Windows component, not a separate download. Microsoft says it is built into Windows, but that does not mean every edition or PC can install it. The documented Windows client path requires Windows 10 or 11 Pro or Enterprise; Windows Home is unsupported for this installation path. The PC also needs a 64-bit processor with virtualization support and Second Level Address Translation (SLAT), plus at least 4 GB of memory. Check the requirements for your specific Windows release and hardware before proceeding. Microsoft’s Hyper-V installation guidance was last updated May 26, 2025.
Install and restart
- Confirm that the PC runs a supported Windows Pro or Enterprise edition and meets the processor and memory requirements.
- Open PowerShell as an administrator.
- Run the documented command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All - Restart Windows when prompted to complete installation.
If the command reports that the feature is unavailable, check the Windows edition and release before troubleshooting the command itself. A Settings interface cannot bypass an edition or hardware requirement.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.4. Install RSAT capabilities and service Windows images
Not every installable Windows component uses the optional-feature model. Remote Server Administration Tools (RSAT) are an example: Windows can expose administrative tools as capabilities, and the installation command uses Add-WindowsCapability. This distinction matters because a feature name and a capability name are not interchangeable. Microsoft’s Add-WindowsCapability reference documents the capability cmdlet.
Find and add the documented RSAT capability
You can search optional-feature entries for tools with:
Get-WindowsOptionalFeature -Online -FeatureName *tools*
For the Server Manager RSAT capability, Microsoft’s example uses its full capability name:
Best Value
Add-WindowsCapability -Online -Name Rsat.ServerManager.Tools~~~~0.0.1.0
Use the exact capability identifier for the tool you intend to install. The example above is specifically Server Manager Tools, not a command to install every RSAT component.
Use DISM PowerShell commands for deployment work
The DISM PowerShell module supports more than turning a component on or off in the running PC. Its cmdlets can query and service Windows images, packages, drivers, features, and capabilities, including mounted WIM and VHD images. This is primarily useful for administrators preparing, repairing, or maintaining deployment images. Microsoft’s DISM PowerShell module documentation describes these image-servicing tasks.
For Windows Server roles and features, use the server-specific cmdlet rather than treating it as a substitute for the Windows client command. Microsoft documents Get-WindowsFeature for Windows Server and offline Server VHDs; client optional features are queried with Get-WindowsOptionalFeature. See the Get-WindowsFeature reference for its supported targets.
Recommended Free Tools
Quick Recap
Choose the right Windows component and target
| Task | Component model | Target and command | Key consideration |
|---|---|---|---|
| Inspect or enable a Windows client component such as Hyper-V | Optional feature | Running OS: -Online; mounted image: -Path. Use Get-WindowsOptionalFeature to inspect and Enable-WindowsOptionalFeature to enable. |
Feature name, Windows edition, hardware support, elevation, source files, and possible restart all matter. |
| Install an RSAT component | Windows capability | Use Add-WindowsCapability with the full capability name; the cited example targets the running OS with -Online. |
Do not substitute a friendly label or optional-feature name for the capability identifier. |
| Manage Windows Server roles and features | Server role or feature | Use the server-specific Get-WindowsFeature cmdlet for Windows Server or offline Server VHDs. |
It is not the general replacement for client Windows optional-feature cmdlets. |
| Prepare or repair deployment images | Image contents such as packages, drivers, features, and capabilities | DISM PowerShell cmdlets can work with mounted WIM and VHD images. | Target the intended mounted image and use an appropriate source when files must be restored. |
When PowerShell is worth using
- Use Settings for a one-off change when you know which optional feature you want and prefer a graphical interface. The Windows 11 Optional features route varies by build; Microsoft guidance places it under Apps in some versions, so check the current Settings layout for your release. Microsoft’s optional-features guidance covers Windows 10 and 11.
- Use PowerShell to filter feature inventories, repeat the same setup, script administration, or target a mounted image.
- Check the component type first: optional features, capabilities, and Windows Server roles use different cmdlets and names.
- Verify the target and prerequisites: distinguish the running OS from an offline image, run commands elevated, and account for dependencies, source files, edition limits, and restarts.
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.




