2

Optional components in Windows are, for example, IIS, telnet server/client, SNMP, etc. In Windows 7 GUI they are installed through Control Panel -> Programs and Features -> Turn Windows features on or off.

On command line you can install them using ocsetup utility, but you have to know the component name for that. E.g. ocsetup TelnetServer.

So the question is how to list all not/installed optional component names on command line?

1
  • What is ocsetup tool ?
    – Kiquenet
    Commented Aug 23, 2022 at 8:39

2 Answers 2

2

The answer was found thanks to this msdn blog article.

Using powershell, list all installed optional components:

$(foreach ($feature in Get-WmiObject -Class Win32_OptionalFeature -Namespace root\CIMV2 -Filter "InstallState = 1") {$feature.Name}) | sort

List all not installed optional components:

$(foreach ($feature in Get-WmiObject -Class Win32_OptionalFeature -Namespace root\CIMV2 -Filter "InstallState != 1") {$feature.Name}) | sort

1
  • compare 2 windows servers (W2012 R2 and W2016) installed components ?
    – Kiquenet
    Commented Aug 23, 2022 at 7:54
0

You can use DISM (Deployment Image Servicing and Management), e.g.

dism /Online /Get-Features /Format:Table

Check dism /Online /? for help.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .