Get-TaskContentAddFeatureOnDemand RSAT selection logic inverted
adpoliak opened this issue · 0 comments
On Windows 10 releases 1809 and above, the RSAT components are installed via Features on Demand, so it makes sense to include those only if targeting a compatible release.
From Microsoft:
If you have a version of Windows 10 prior to the October 2018 Update (1809), you will not be able to use Features on Demand. You will need to download and install the RSAT package.
Download and install WS_1803 RSAT package, as outlined below: When installing on Windows 10 April 2018 Update (1803) or earlier, for managing Windows Server, version 1803 or Windows Server, version 1709.
The Get-TaskContentAddFeatureOnDemand cmdlet builds the selection list via exclusion (it gets all files in the IsoExtract directory and starts filtering out undesired/incompatible files).
This means that the RSAT-related files should be filtered out for Release IDs below 1809.
Instead,
OSDBuilder/Private/AllFunctions.ps1
Line 3046 in 67c3866
Changing $OSMedia.ReleaseId -gt 1803
to $OSMedia.ReleaseId -le 1803
(or $OSMedia.ReleaseId -lt 1809
to better fit Microsoft's verbiage) addresses this issue.
I can fork and submit a Pull Request if it'll help get this fixed.