When connected to a domain and using WSUS for Windows Updates; adding features to Windows 10 (without local install media) causes an exception. To work around this, open regedit and navigate to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
Change the entry for UseWUServer from 1 to 0.
Exit Registry Editor and reboot the PC.
Now add the required feature, using the command line:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
Once the feature is added and Windows is restarted, GPO will probably set the registry key back to 1 but to be sure go back into Registry Editor and change the entry back.
See this for adding .NET 2.0/3.5 using an offline setup: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/deploy-net-framework-35-by-using-deployment-image-servicing-and-management–dism