I hate the fact that I had to make a solution for this at some point as there was a bug with Windows 11 and if you have/had a WSUS in your environment. Confirm your build numbers.
$osVersion = [System.Environment]::OSVersion
$buildNumber = $osVersion.Version.Build
$sourcePath23H2 = "\\solvingsccm\ConfigMgr\Sources\NetFX35Fix\23H2sxs"
$sourcePath24H2 = "\\solvingsccm\ConfigMgr\Sources\NetFX35Fix\24H2sxs"
#Check if 24H2 or 23H2 since we live in Microsoft's world
if ($buildNumber -ge 26100) {
$sourcePath = $sourcePath24H2
} else {
#Otherwise its 23H2 (untested if 23H2 cab file will work on earlier versions but doubtful)
$sourcePath = $sourcePath23H2
}
#Do the DISM
dism.exe /online /enable-feature /featurename:NetFx3 /source:"$sourcePath" /limitaccess
Have the CAB files for the .netfx 3.5 install per sxs folder in the ISO folder.
This will check if the Windows 11 version is 24H2 or 23H2 and then install the appropriate cab file for 3.5 using DISM.