Often, the above command fails if Windows tries to check Windows Update first. Use this stricter version:
dism /online /enable-feature /featurename:NetFx3 /all /source:D:\sources\sxs /limitaccess
If the CAB is sitting alone on your desktop (e.g., C:\Users\Admin\Desktop\cab), run: Microsoft-windows-netfx3-ondemand-package.cab -Extra
dism /online /enable-feature /featurename:NetFx3 /all /source:C:\Users\Admin\Desktop\cab /limitaccess
If you have mounted a Windows ISO file, the .NET 3.5 payload is not stored as a single .cab file on the root. Instead, it is located within the installation sources. The path usually looks like this:
D:\sources\sxs\microsoft-windows-netfx3-ondemand-package.cab
(Where D: is the drive letter of the mounted ISO) PowerShell:
Note that in the sxs (Side-by-Side) folder, there may be multiple cabinet files, but this specific one is the "parent" package that initiates the installation. Add CAB to an offline WIM:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxs