When creating an OSBuild for Windows 10, your have the option to disable a Windows Optional Feature
New-OSBuildTask -TaskName Demo -DisableWindowsOptionalFeature
The selected Windows Optional Features will be added to the OSBuild Task. When executing New-OSBuild, these Windows Optional Features will be disabled