This is the built-in help made by Microsoft for the command 'Get-WindowsOptionalFeature', in PowerShell version 5 - as retrieved from
Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Gets information about optional features in a Windows image.
Get-WindowsOptionalFeature [-FeatureName <String>] [-LogLevel <LogLevel>] [-LogPath <String>] [-PackageName <String>] [-PackagePath <String>] [-ScratchDirectory <String>]
[-SystemDrive <String>] [-WindowsDirectory <String>] -Online [<CommonParameters>]
Get-WindowsOptionalFeature [-FeatureName <String>] [-LogLevel <LogLevel>] [-LogPath <String>] [-PackageName <String>] [-PackagePath <String>] [-ScratchDirectory <String>]
[-SystemDrive <String>] [-WindowsDirectory <String>] -Path <String> [<CommonParameters>]
The Get-WindowsOptionalFeature cmdlet gets information about all features (operating system features that include optional Windows foundation features) in the Windows
Foundation Package or a specified package in the Windows image.
Use the PackageName or PackagePath parameter to get information about all features in a specific package in the Windows image.
The FeatureName parameter gets more detailed information about a specific feature in the Windows image. If the feature is not a part of the Windows Foundation package,
either a PackageName or PackagePath parameter must be used to specify the parent package of the feature.
Use the Online parameter to specify the running operating system on your local computer, or use the Path parameter to specify the location of a mounted Windows image.
<
Online Version: http://go.microsoft.com/fwlink/p/?linkid=289358
Add-WindowsPackage
Enable-WindowsOptionalFeature
Get-WindowsPackage
<
Example 1
PS C:\>Get-WindowsOptionalFeature –Online
This command lists all of the optional features in the running Windows operating system.
Example 2
PS C:\>Get-WindowsOptionalFeature –Path c:\offline –PackageName Microsoft-Windows-Backup-Package~31bf3856ad364e35~x86~~6.1.7601.16525
This command displays lists all of the optional features in the specified package in the Windows image mounted to c:\offline.
Example 3
PS C:\>Get-WindowsOptionalFeature –Path c:\offline –FeatureName Hearts
This command displays detailed information about the feature, Hearts, in the Windows Foundation Package in the Windows image mounted to c:\offline.
Example 4
PS C:\>Get-WindowsOptionalFeature –Path c:\offline –FeatureName MyFeature –PackagePath c:\packages\package.cab
This command displays detailed information about the feature, MyFeature, in the package at c:\package\package.cab in the Windows image mounted to c:\offline.