Make sure you have the Windows 8, 10 or Server 2012 installation disc in your drive
In the example below, the installation disc is in the D:\ drive
Open an administrative PowerShell command window and enter the following:
Server 2012
Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs
Windows 8, 10
Enable-WindowsOptionalFeature –online –featurename NetFx3 -source D:\sources\sxs
Wait until installation is complete, then run Windows Update to get the latest patches and fixes