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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use the cmdlet that matches the Windows installation you are querying. On a Windows client, run Get-WindowsOptionalFeature -Online and read each returned State. On Windows Server, run Get-WindowsFeature | Where-Object Installed and inspect the installed rows or their InstallState. The client and ServerManager commands report different feature inventories, so choosing the right one is the essential first step.

Choose the command for your Windows edition

“Windows features” can mean two different management systems. Windows client editions expose optional operating-system components through the DISM PowerShell cmdlet Get-WindowsOptionalFeature. Windows Server uses the ServerManager cmdlet Get-WindowsFeature for server roles and features.

Target Command Property or result to inspect
Optional features in the currently running Windows client Get-WindowsOptionalFeature -Online State
One optional feature in the running client Get-WindowsOptionalFeature -Online -FeatureName 'FeatureName' State
Optional features in a mounted offline client image Get-WindowsOptionalFeature -Path 'C:Mount' State
Installed roles and features on Windows Server Get-WindowsFeature | Where-Object Installed Installed rows and InstallState

The commands above query state; they do not enable or disable anything. Use -Online for the operating system that is currently booted. Use -Path for a mounted Windows client image. ServerManager can query a remote server with -ComputerName or an offline Server VHD with -Vhd.

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

1. Open PowerShell

Start PowerShell in the Windows installation whose optional components you want to inspect. The command is read-only. Microsoft’s administrative examples may use an elevated session, but a listing command should not be described as universally requiring elevation; access can vary with the specific environment and target.

2. Query the online operating system

Get-WindowsOptionalFeature -Online

-Online means the running operating system, not an internet lookup. The cmdlet returns the optional features known to that installation together with their status information.

3. Read the State value

For each returned feature, inspect State. That value is the indicator you use to determine whether the component is enabled, disabled, or in another transition or servicing condition. Do not infer status from the feature name alone: a feature can be present in the inventory while its current state is not enabled.

When a state has changed or a servicing operation is pending, the cmdlet output also indicates whether a restart might be required. Treat that restart indication as part of the result rather than assuming every state change takes effect immediately.

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.

Make a long result easier to inspect

The default output can contain many rows. In an interactive session, let the result finish and then inspect the feature name alongside State. If you are checking one component, querying that component directly is less error-prone than scanning the entire list.

Inspect one Windows client feature by name

Use an exact feature name

Supply the feature name with -FeatureName:

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

The returned object contains the feature’s State. This is useful when documentation, a deployment script, or an earlier inventory gives you the exact name and you need to verify only that component.

Search by a name pattern

If you know only part of the name, use a wildcard:

Get-WindowsOptionalFeature -Online -FeatureName '*Hyper-V*'

The wildcard asks PowerShell to return matching feature names so you can identify the precise entry and then read its state. A pattern is especially helpful when several related components share a naming prefix or suffix. Keep the quotation marks around the pattern so the wildcard is interpreted by the cmdlet rather than by another layer of command parsing.

What this check does not do

These commands do not install, remove, enable, or disable the selected feature. Running a query is therefore appropriate when you are auditing configuration, troubleshooting an application dependency, or documenting an image and do not want to change the system.

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

Check optional features in an offline Windows image

An offline image is a Windows installation that is not the operating system currently running. It may be mounted while you service a deployment image or inspect another installation. Use the mount directory as the value of -Path:

Get-WindowsOptionalFeature -Path 'C:Mount'

Replace C:Mount with the actual directory where the image is mounted. Do not combine this scenario with -Online: -Online asks about the current operating system, whereas -Path identifies the offline image you intend to inspect.

Confirm that you are examining the intended image

  • Use the mount path belonging to the image under investigation.
  • Keep the path quoted when it contains spaces or when you want the command to be unambiguous.
  • Interpret the returned State values as the state recorded in that image, not as the state of the host computer.

This distinction matters during deployment work. A feature can be enabled in the running technician computer while remaining disabled in the image being prepared for another device, so querying the wrong target can produce a convincing but irrelevant result.

Check installed roles and features on Windows Server

List only installed entries

Windows Server uses ServerManager rather than the client optional-feature cmdlet. To answer “what is installed now,” run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Get-WindowsFeature | Where-Object Installed

Get-WindowsFeature reports both features available for installation and features already installed. The Where-Object Installed filter removes the available-but-not-installed entries, leaving the rows relevant to an installation audit.

Inspect the installation state

Review the installed rows and their InstallState. The row tells you which role or feature was returned, while InstallState provides the state used by ServerManager. Keep the terminology straight: on a client you read State; on ServerManager output you read the installed row and InstallState.

Why filtering is necessary

An unfiltered ServerManager listing answers a broader question: which roles and features are available to this server, including those that could be installed later. It does not mean every returned entry is active. If your question is “what is currently installed,” retain the filter. If your question is “what could this server install,” omit it intentionally and interpret the complete inventory as an availability list.

Query a remote server or an offline Server VHD

Remote Windows Server

ServerManager can target another server by using -ComputerName. The general form is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Get-WindowsFeature -ComputerName 'ServerName' | Where-Object Installed

Replace ServerName with the computer name you are authorized to query. The same installed-entry filter applies: without it, the result includes features that are available but not installed on the target.

Offline Server VHD

To inspect a Server virtual hard disk instead of a running server, use -Vhd:

Get-WindowsFeature -Vhd 'C:ImagesServer.vhdx' | Where-Object Installed

Use the path to the VHD that contains the Server installation. The result describes the image in that virtual disk, not the host operating system where PowerShell is running.

The remote and VHD parameters are ServerManager capabilities. Do not substitute them for the client image form: client optional features use -Path with a mounted image.

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

Client optional features versus Server roles and features

Question Windows client Windows Server
Which management system applies? DISM optional-feature cmdlet ServerManager cmdlet
All components on the current system Get-WindowsOptionalFeature -Online Get-WindowsFeature, optionally filtered
How to identify enabled or installed status Read State Read installed rows and InstallState
Offline target Mounted image with -Path Server VHD with -Vhd
Remote target The supplied client command targets the local online OS or an image path -ComputerName targets a remote server
Does the default listing include unavailable or uninstalled items? Returns optional-feature entries and their states Yes; filter with Where-Object Installed when you need installed items only

This is why copying a ServerManager command into a client troubleshooting session, or using the client cmdlet to inventory Server roles, can lead to an incomplete or misleading answer. Identify the edition and target first, then choose the matching command.

A practical verification workflow

  1. Identify the target. Decide whether you are checking the running client, a mounted client image, a local Server installation, a remote server, or a Server VHD.
  2. Select the management family. Use Get-WindowsOptionalFeature for client optional features. Use Get-WindowsFeature for Server roles and features.
  3. Run a read-only query. Use -Online for the running client, -Path for a mounted client image, -ComputerName for a remote Server, or -Vhd for an offline Server virtual disk.
  4. Limit the result when you know the component. On a client, pass an exact -FeatureName or a wildcard pattern. On Server, keep Where-Object Installed when the requirement is an installed-only inventory.
  5. Read the correct status field. Use State for client optional features. Use the installed rows and InstallState for ServerManager output.
  6. Record restart information. If the client cmdlet reports that a restart might be required after a state change, include that condition in your change record or troubleshooting notes.
  7. Verify that no change was made. These inspection commands report configuration; they do not perform the enable or disable operation.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes and how to correct them

Using the wrong cmdlet for the edition

Symptom: The output does not contain the roles or optional components you expected. Correction: Reclassify the target. Client optional features belong to Get-WindowsOptionalFeature; Server roles and features belong to Get-WindowsFeature.

Checking the host instead of an offline image

Symptom: The result reflects the technician computer rather than the image being prepared. Correction: Use -Path with the mounted client-image directory or -Vhd with the Server virtual-disk path. Reserve -Online for the currently booted operating system.

Interpreting availability as installation

Symptom: A Server feature appears in the listing, so it is assumed to be installed. Correction: Remember that ServerManager includes available entries. Run Get-WindowsFeature | Where-Object Installed and inspect InstallState for the installed inventory.

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

Searching with an imprecise name

Symptom: An exact-name query returns no useful match because the component name is not known. Correction: Start with the complete client listing or use a wildcard such as *Hyper-V* to discover matching names, then run an exact query for the entry you need.

Running a state check that changes the machine

Symptom: A troubleshooting session unexpectedly starts servicing a feature. Correction: Use only the Get commands shown here for inspection. Do not substitute enable or disable commands when the requirement is to determine the current state.

Assuming every query needs elevation

Symptom: A general instruction tells every reader to launch an elevated console even though the task is only listing state. Correction: Separate read-only inventory from operations that change Windows. Microsoft’s DSC OptionalFeatureList example requires an elevated administrator session, but that example-specific requirement should not be generalized to every listing command without checking the target environment.

Examples by reader goal

“Is Hyper-V enabled on this Windows client?”

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

Read the returned State. If you do not know the exact feature name, use Get-WindowsOptionalFeature -Online -FeatureName '*Hyper-V*' first and inspect each matching entry.

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.

“Which optional components are recorded in this mounted image?”

Get-WindowsOptionalFeature -Path 'C:Mount'

Review State for the image at that mount path. This does not report the state of the host machine.

“Which roles and features are installed on this Server?”

Get-WindowsFeature | Where-Object Installed

Use the installed rows and InstallState rather than treating every available row as active.

“Which roles are installed on another Server?”

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

The query is directed at the named remote computer; the filter keeps the answer focused on installed entries.

“What is installed in a Server VHD?”

Get-WindowsFeature -Vhd 'C:ImagesServer.vhdx' | Where-Object Installed

Inspect the returned installed rows and their InstallState for the virtual-disk image.

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

What to document after the check

A useful feature inventory records more than a command transcript. Note the Windows edition, whether the target was online or offline, the path or computer name used, the feature name or wildcard, the reported State or InstallState, and any restart indication. These details make it possible for another administrator to reproduce the same check and distinguish a client image result from a Server or host result.

Keep “available,” “installed,” and “enabled” separate in your notes. ServerManager’s complete list includes items available for installation, while the installed-only filter answers the narrower question. On the client side, the returned State is the authoritative status field for the optional-feature entry you queried.

Quick reference

  • Running Windows client: Get-WindowsOptionalFeature -Online
  • One client feature: Get-WindowsOptionalFeature -Online -FeatureName 'FeatureName'
  • Client feature search: Get-WindowsOptionalFeature -Online -FeatureName '*Pattern*'
  • Mounted client image: Get-WindowsOptionalFeature -Path 'C:Mount'
  • Installed local Server roles/features: Get-WindowsFeature | Where-Object Installed
  • Installed remote Server roles/features: Get-WindowsFeature -ComputerName 'ServerName' | Where-Object Installed
  • Installed roles/features in a Server VHD: Get-WindowsFeature -Vhd 'C:ImagesServer.vhdx' | Where-Object Installed
  • Status field: read State for client optional features and InstallState for ServerManager results.

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.