Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › PowerShell

How to Check Which Windows Features Are Enabled with PowerShell

By Freedom251 Team · · 9 min read

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

Use Get-WindowsOptionalFeature -Online for optional features in the Windows client that is currently running. Use Get-WindowsFeature | Where-Object Installed for installed roles and features on Windows Server. In either case, inspect the returned state or installation column; these commands report status and do not change the system.

Choose the command that matches your Windows installation

“Windows feature” can refer to two different management systems. Desktop editions such as Windows 10 and Windows 11 expose optional components through the DISM-backed Get-WindowsOptionalFeature cmdlet. Windows Server exposes server roles and features through the ServerManager Get-WindowsFeature cmdlet. Choosing the wrong family can produce a list that does not answer the question you actually have.

As an Amazon Associate I earn from qualifying purchases.

Target Command Column to read What the command includes
Running Windows client Get-WindowsOptionalFeature -Online State Optional features known to the current operating-system image
One Windows client feature Get-WindowsOptionalFeature -Online -FeatureName 'FeatureName' State The requested feature, if its name matches
Mounted offline Windows client image Get-WindowsOptionalFeature -Path 'C:Mount' State Optional features in the image mounted at that path
Windows Server roles and features Get-WindowsFeature | Where-Object Installed Installed rows or InstallState Available entries narrowed to those installed on the server

The client commands use -Online to mean the operating system that is booted now. The offline form uses -Path and must point to a mounted Windows image. The ServerManager command can also query another computer or a Server VHD, but its unfiltered output contains items that are merely available for installation.

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

Check all optional features on the running Windows client

Run the complete listing

  1. Open PowerShell. A read-only listing normally does not need the same elevation requirement as a change operation, but access policies and the particular image can affect what is readable.
  2. Run:
    Get-WindowsOptionalFeature -Online
  3. Review the objects returned in the console. The FeatureName identifies each component and State tells you its current condition.

This operation queries the active Windows image; it does not enable, disable, add, or remove a feature. If you are documenting a machine, save the displayed feature name and state together so another administrator can distinguish a component that is enabled from one that is present but not active.

Display only the fields you need

The default view can contain more columns than are useful when you are checking a long list. Select the identifying and status fields for a compact report:

Get-WindowsOptionalFeature -Online |
    Select-Object FeatureName, State

This does not alter the query; it only changes how PowerShell presents the returned objects. Keeping the full objects is useful when you need additional metadata, while selecting two columns makes a pasted ticket or audit note easier to read.

Find enabled entries in a long result

To narrow the display to entries whose state is reported as enabled, filter the objects after retrieval:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Get-WindowsOptionalFeature -Online |
    Where-Object State -eq 'Enabled' |
    Select-Object FeatureName, State

Use the exact state text shown by your system. The status field is the authority for the queried image; do not infer enablement from a feature’s name or from the fact that it appears in the list.

Inspect one named Windows client feature

Query an exact feature name

When you already know the component name, pass it to -FeatureName:

Get-WindowsOptionalFeature -Online -FeatureName 'Microsoft-Hyper-V-All'

The result includes the requested feature and its State. Replace the example with the exact value in your environment. Names are feature identifiers, not the friendly labels shown in every Windows settings page, so copying the FeatureName from the full listing avoids spelling mistakes.

Search by part of a name

A wildcard is useful when you know only a family or keyword:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Get-WindowsOptionalFeature -Online -FeatureName '*Hyper-V*'

The wildcard can return several related entries. Treat each returned row independently and read its state; finding one enabled Hyper-V-related component does not establish that every matching component is enabled.

When an exact query returns no useful match

  • Run the unfiltered listing and copy the identifier from FeatureName.
  • Try a narrower wildcard around a distinctive part of the identifier.
  • Confirm that you are querying a client image. Server roles and features use a different cmdlet.
  • Check that the spelling, hyphens, and capitalization in the command match the identifier you copied.

Do not substitute a display name guessed from a graphical dialog. The cmdlet evaluates the feature identifier exposed by the Windows image.

Understand the State value and restart information

Use the state returned for the image you queried

For the client cmdlet, State is the field that answers whether the optional feature is enabled. The same field also distinguishes a feature that is not currently enabled from one that is active. If a state change has been requested elsewhere and Windows reports that a restart may be needed, treat that restart indication as part of the result rather than assuming the change is complete.

A listing is a snapshot of the image at query time. If another administrator changes a feature while you are looking at the output, run the command again before recording a final status.

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

Do not confuse presence with activation

A feature can be represented in the image even when its state is not enabled. The fact that a name appears in Get-WindowsOptionalFeature -Online is therefore not proof that the feature is usable. Base your conclusion on the returned state for the specific entry.

Check for a pending restart without making changes

The cmdlet output can indicate whether a restart might be required when a feature’s state changes. Capture the complete object when that detail matters instead of reducing the output to only a name. A pending-restart indication is a follow-up condition, not an instruction to run an enable or disable command as part of a status check.

Query an offline Windows client image

Use the image’s mount path

For a Windows image mounted at C:Mount, run:

Get-WindowsOptionalFeature -Path 'C:Mount'

This reads the optional-feature state inside the mounted image rather than the operating system currently running PowerShell. It is the appropriate form when you are servicing a captured image, a deployment image, or another offline installation.

Keep online and offline results separate

Do not compare an offline report with an online report as though they describe the same installation. The path identifies the image whose state is being read. A successful query against C:Mount says nothing about the feature state of the host operating system unless both happen to be the same image.

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

If the path query fails

  • Verify that the directory is the root of a mounted Windows image, not an arbitrary folder containing copied files.
  • Check the path spelling and drive letter in the current session.
  • Confirm that the image is still mounted while the command runs.
  • Switch back to -Online only when your actual target is the running operating system.

The command reads state; it does not mount, unmount, repair, or modify the image.

Check installed roles and features on Windows Server

List only installed entries

Windows Server uses ServerManager’s Get-WindowsFeature cmdlet. To answer “what is installed?” rather than “what could be installed?”, filter the result:

Get-WindowsFeature | Where-Object Installed

The pipeline first obtains the server’s roles and features, then keeps entries whose Installed property is true. The resulting rows identify installed items; the cmdlet also exposes an InstallState value that can be inspected when you need the installation-state field explicitly.

Why filtering matters

Get-WindowsFeature reports features available for installation as well as those already installed. An unfiltered list can therefore be misread as an inventory of active server capabilities. A feature being offered by the server image means it is available, not that it is installed or enabled. Apply the installed filter before exporting or reporting the result.

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.

Inspect a particular server entry

Once the list is visible, use the feature’s name or display name to identify the row you need. Keep the row’s installation state with the name in your documentation. If the question concerns a role composed of several subfeatures, inspect each relevant row; a parent role entry alone may not describe every component that was installed.

Query a remote server or an offline Server VHD

Ask another server for its inventory

The ServerManager cmdlet can target a remote computer with -ComputerName:

Get-WindowsFeature -ComputerName 'SERVER01' |
    Where-Object Installed

Replace SERVER01 with the remote computer name used in your environment. The command still returns ServerManager feature objects, so use the same installed-row or InstallState interpretation as for a local server. Connectivity, permissions, and remote-management policy must allow the query; a failure to contact the computer is not evidence that the server has no installed features.

Read an offline Server VHD

For a Server virtual hard disk that is not the running system, use the -Vhd parameter:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Get-WindowsFeature -Vhd 'D:ImagesServer.vhdx' |
    Where-Object Installed

The path must identify the VHD you intend to inspect. Keep offline VHD results labeled with the file path and date so they are not confused with the host server’s inventory.

Do not mix client and Server parameters

-Path belongs to the Windows client optional-feature query for a mounted image. -Vhd and -ComputerName are documented ways to target ServerManager data. If a parameter is rejected, first verify that you are using the cmdlet family designed for that target rather than trying to force a client command to inspect a server role.

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

Save a readable inventory for troubleshooting or audits

Export client feature states

After selecting the fields you need, export them as CSV:

Get-WindowsOptionalFeature -Online |
    Select-Object FeatureName, State |
    Export-Csv -Path '.windows-client-features.csv' -NoTypeInformation

The file records the feature identifier and the state returned at export time. Include the computer name, Windows edition, and collection date in the surrounding ticket or filename; the command itself does not turn the CSV into a permanent guarantee that the system will remain unchanged.

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

Export installed Server features

Get-WindowsFeature |
    Where-Object Installed |
    Select-Object Name, DisplayName, InstallState |
    Export-Csv -Path '.server-installed-features.csv' -NoTypeInformation

This produces an installed-only report while retaining both the machine-readable name and a display label. If you are querying a remote server, run the same selection after adding -ComputerName and record the target name beside the file.

Use caution when comparing reports

  • Compare client reports with client reports and ServerManager reports with ServerManager reports.
  • Use the same filtering rule each time; an all-available ServerManager export is not comparable to an installed-only export.
  • Keep the target path, computer name, or VHD path with offline and remote reports.
  • Re-run the query after maintenance if a restart or feature change occurred between captures.

Common mistakes and how to correct them

Using Get-WindowsFeature on a desktop edition

That cmdlet is for Windows Server roles and features. On a Windows client, use Get-WindowsOptionalFeature and read State. If you need to confirm the target, run the command from the operating system whose optional features you want to inspect.

Using -Online for an offline image

-Online always means the currently running image. Replace it with -Path and the mounted image path when the installation you care about is offline.

Reporting every ServerManager row as installed

Because ServerManager lists available entries too, an unfiltered transcript overstates what is installed. Pipe the results to Where-Object Installed, or explicitly inspect InstallState for each row.

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

Changing the system while trying to check it

Status commands are sufficient for an inventory. Do not run enable, disable, add, or remove commands merely because a feature is listed as disabled or unavailable. First establish the state, then follow a separate change procedure with the required approvals and restart planning.

Assuming administrator elevation is universal

Microsoft’s administrator requirement for its DSC OptionalFeatureList example applies to that DSC scenario. It should not be generalized into a claim that every read-only listing command always requires an elevated PowerShell window. If your environment blocks the query, follow its access policy and test the specific command in the intended session.

Interpreting a restart indication as immediate enablement

A restart-needed indication means Windows may require a reboot for a state change to take effect. It does not replace checking the feature’s reported state, and it does not justify issuing a change command during an inventory task.

A repeatable checklist

  1. Identify the target: running Windows client, mounted client image, local Windows Server, remote server, or Server VHD.
  2. Select the matching cmdlet and targeting parameter.
  3. Run the read-only query.
  4. For a client, read FeatureName and State; for ServerManager, read installed rows and, when needed, InstallState.
  5. Filter ServerManager output so available-but-uninstalled entries are not reported as installed.
  6. Record the computer name, image path, VHD path, or other target identifier with the result.
  7. Note any restart indication shown by the client cmdlet.
  8. Run the query again after approved maintenance or a restart if you need a post-change inventory.

For a quick desktop check, the essential command is Get-WindowsOptionalFeature -Online. For a Server installation inventory, the essential pattern is Get-WindowsFeature | Where-Object Installed. Keeping those two workflows separate prevents the most common error: treating an available feature, a client optional component, and an installed Server role as though they were the same thing.

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

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.

PowerShellsystem administrationWindowsWindows FeaturesWindows Server

Leave a Reply

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

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.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver 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.