Windows Server 2012 STD R2
To install Microsoft .NET Framework 3.5.1 on Windows Server 2012 R2
Open Server Manager and select Features.
Select Add roles and features to launch the Add Roles and Features wizard.
In the Add Roles and Features wizard, click the .NET Framework 3.5 checkbox (under the .NET Framework 3.5 Features container) and click Next.
In the Confirm Installation Selections dialog box, click Install.
When the installation is complete, click Close to finish. Check for the latest Windows updates and install any Critical or Security updates related to Microsoft .NET.
============
Windows Server 2016/2019 STD
Open Server Manager and select Features.
Select Add roles and features to launch the Add Roles and Features wizard.
In the Add Roles and Features wizard, click the .NET Framework 3.5 checkbox (under the .NET Framework 3.5 Features container) and click Next.
In the Confirm Installation Selections dialog box, click Specify an alternate source path.
Insert the Windows Server installation media.
In the Specify Alternate Source Path dialog box, enter the path and click OK. The Confirm Installation Selections dialog box appears.
Click Install.
When the installation is complete, click Close to finish. Check for the latest Windows updates and install any Critical or Security updates related to Microsoft .NET.
Credit: genesys.com