Microsoft .NET Framework 3.0 failed to be turned on. Status: 0x800f0906

While installing SQL Server 2012 at work on a Server 2012 R2 machine the install kept failing. Looking at the Setup logs I noticed that whenever I’d try an install something would try and install the .NET Framework 3.0 feature and fail. So I tried enabling the feature manually but it kept failing with the above error: Update NetFx3 of package Microsoft .NET Framework 3.0 failed to be turned on. Status: 0x800f0906.

On the GUI I kept getting errors that the source media didn’t have the required files, which was odd as I was correctly pointing to the right WIM file (and later I even expanded this file to get to the Sources\SxS folder) but event viewer had the above error. 

To get a better idea I tried install this feature via the command line. The .NET Framework 3.0 feature is called NET-Framework-Core (you can find this via a Get-WindowsFeature) so all I had to do was something along these lines:

I didn’t expect this to work but strangely it did! No errors at all. Thought I’d post this in case it helps anyone else.