Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.73 KB

querying-the-status-of-optional-features.md

File metadata and controls

44 lines (30 loc) · 1.73 KB
description ms.assetid ms.tgt_platform title ms.topic ms.date
In Windows 7, WMI implemented the Win32\_OptionalFeature class. This class retrieves the status of the optional features that are present on a computer.
d756b0c0-b9f4-4b71-9f07-963a0dd5e585
multiple
Querying the Status of Optional Features
article
05/31/2018

Querying the Status of Optional Features

In Windows 7, WMI implemented the Win32_OptionalFeature class. This class retrieves the status of the optional features that are present on a computer.

You can use Windows PowerShell cmdlets to query the status of optional features. All of the examples in this topic use the Get-WmiObject cmdlet. For more information, see Get-WmiObject.

To retrieve all instances of optional features present on a computer

PowerShell
Get-WmiObject Win32_OptionalFeature

To query for an optional feature by specifying the feature name

PowerShell
Get-WmiObject -query "select * from Win32_OptionalFeature where name = 'TelnetClient'"

Note

The name property is case-sensitive.

To query for optional features by specifying the install state

PowerShell
Get-WmiObject -query "select * from win32_optionalfeature where installstate= 1"

For more information about the possible values for the InstallState property, see Win32_OptionalFeature.

Related topics

Win32_OptionalFeature