How to install/enable .Net 3.5 SP1 on Windows Server 2008 R2 for SQL Server 2008 and SQL Server 2008 R2

The .NET Framework 3.5 SP1 (also referred to as .NET Framework 3.5.1) is a prerequisite for SQL Server 2008. SQL Server 2008 Setup for standalone instance will install the .NET Framework 3.5 SP1 if it is not already installed. In Windows Server 2008 R2, the .NET Framework is a feature and installing it is different when compared to older versions of Windows Operating System. In previous versions, one could either download the .NET Framework 3.5.1 install binaries from Microsoft download site or use the install binaries from the redist folder of the SQL Server 2008 installation media. Starting with Windows Server 2008 R2, the method of installing .NET Framework 3.5.1 has changed. This document explains how to verify that .NET Framework 3.5.1 is installed and if it is not installed how you can add it.
How to verify if .NET Framework 3.5 SP1 is installed:

Here are the steps to verify that .NET Framework 3.5.1 is installed on Windows Server 2008 R2.

  1. Click the Start button in the lower left hand corner of the display.
  2. Highlight Administrative Tools and select Server Manager.
  3. In the Server Manager interface, click Features to display all the installed Features in the right hand pane. Verify that .NET Framework 3.5.1 is listed.

If .NET Framework 3.5.1 feature is not listed, you can use either of the following methods to install it:

Method 1: Using Server Manager Interface

  1. In the Server Manager interface, select Add Features to displays a list of possible features.
  2. In the Select Features interface, expand .NET Framework 3.5.1 Features.
  3. Once you expand .NET Framework 3.5.1 Features, you will see two check boxes. One for .NET Framework 3.5.1 and other for WCF Activation. Check the box next to .NET Framework 3.5.1 and click Next.
    Note: If you do not expand .NET Framework 3.5.1 Features and check it, you will get a pop-up titled Add Features Wizard  as shown below.

    Click Cancel and expand .NET Framework 3.5.1 Features and then check .NET Framework 3.5.1 check box below it.


    You cannot install .NET Framework 3.5.1 Features unless the required role services and features are also installed.
  4. In the Confirm Installation Selections interface, review the selections and then click Install.
  5. Allow the installation process to complete and then click Close.

Method 2: Using PowerShell

  1. Click the Start button in the lower left hand corner of the display.
  2. Highlight All Programs and select Accessories
  3. Expand Windows PowerShell and right click Windows PowerShell and select Run as administrator. Click Yes on the User Account Control box.
  4. At the PowerShell command prompt, type the following commands, and then press ENTER after each command:
  • Import-Module ServerManager
  • Add-WindowsFeature as-net-framework

Note: A screenshot is shown below:


Comments (59)

  1. Shane Miller says:

    I did that and I get an install error on a brand new install. says I am missing source files

    1. Shane Miller says:

      I used to have a .net 3.5 full install that would force install from a .exe file and bypass the features on 2012 r2 but I cant find it. Where on the MSDN would this forced 3.5 full install be? THis is a known issue.

  2. saeed says:

    Hello thank you for helping you !!!!!

  3. sachin says:

    Does the same cmdlets apply for windows server 2008 as well?

    We have a windows server 2008 running on SP2 and we need to install the .net framework 3.5 on it, but these cmdlets do not work and I get the error

    Import-Module : The specified module ‘ServerManager’ was not loaded because no valid module file was found in any modu
    e directory.
    At line:1 char:14
    + Import-Module <<<< ServerManager
    + CategoryInfo : ResourceUnavailable: (ServerManager:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

  4. Anonymous says:

    Perfect! Works fine for me.
    I was trying to install the Management Studio for SQL Express when I got an error msg.

  5. Willian Pereira says:

    Boa tarde,

    Pessoal, estou com problemas em instalar o meu servidor web service com IIS ao tentar instalar o Net framework 3.5.1 pelo modo normal do Windows acontecem 2 evidencias com a offiline não abre e com a Web ele da um erro. Quando vou ate o Gerenciador de recursos e tento instalar ele aparece a caixa marcada mais não me da opção de de fazer nenhuma operação, com tudo tentei também a opção pelo Windows PowerShell e não obtive sucesso informa função ou serviço invalido, gostaria de saber se alguém poderia me ajudar.


  6. FARHAN NAZIR says:

    Import-Module : The specified module ‘ServerManager’ was not loaded because no valid module file was found in any modu
    e directory.
    At line:1 char:14
    + Import-Module <<<< ServerManager
    + CategoryInfo : ResourceUnavailable: (ServerManager:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

    1. BLKSTHL says:

      Farhan, you are probably running the command in a 32bit/x86 PS prompt. Use a x64 and it will work.

  7. Anil yadav says:

    Thanks a lot it was very simple method.

  8. yan jing says:

    thank u so much

  9. Amit Ghosh says:

    Thanks man. It’s save my whole day. Installing .Net 3.5 solved the issue of ‘system.serviceModel’. I used the app pole in .NET 2.0

  10. Ashok says:

    i am proud of this instruction so thanks

  11. Dinesh Vishe says:

    Powershell installation is very easy.

    Import-Module ServerManager

    Add-WindowsFeature as-net-framework

    will work on on session and time saving.

  12. Dinesh Vishe says:

    Excellent…..    ahmsal1984


  13. Testing-Dev says:

    Same issue here Opie-wan, did you get this resolved?

  14. Shubhangi says:

    Remot server  is not found in the shell program??

  15. Opie-wan says:

    I think I am having the same problem as Mohsen (June 28 post)  

    I am trying to add SQL Server reporting services, and when I try to add features, the installer complains that .Net 3.5.1 installation failed and it is required for SQL Server.  When I look, I verify that .net 3.5 is installed, but I have searched all over and can not find nor figure out how to upgrade .Net 3.5 to .Net 3.5.1 on Windows Server 2012 R2.  The only option I am presented with in Server Manager is .Net 3.5, and it is installed.

    Can anybody point me in the right direction?  I think once I get the .Net framework SNAFU settled, the SQL Server install will probably work.

  16. Mohsen says:


    When I try to install SQL server 2008, a message appear that .net framework 3.5 installing failed and need to this not 3.5.1 and problem not solved.

    Any idea?

  17. kk says:

    we upgrads the .netframework 3.5 to 4.0 in exchange server 2010 its impact to edge server 2010,2010 edge server support to .net framwork 4.0

  18. Roberto says:


    I have tried both suggested way, but:

    when I try trough server manage, at the end of the installation process, the system prompts that ita has been impossible to install all 3 services/roles required.

    If i try with PowerShell, I cannot import server manager module.

    Any clue on this?

    Thank you


    What does net framework  3.5 p1 do? Is it absolutely necessary?

  20. Yogesh Mahto says:

    I'v solved the problem,thanks a lot!

  21. chathuranga says:


    can i update .net framework 3.5 to 4.5. if any one know please help me

  22. 444 says:

    Installing a Windows language pack before installing the .NET Framework 3.5 will cause the .NET Framework 3.5 installation to fail. Install the .NET Framework 3.5 before installing any Windows language packs.

  23. I. Greß says:

    Thanks a lot, it was very useful.

    Greetings from Mexico

  24. Vikram says:

    Thanks for the detailed info…I solved the problem.

  25. avhacker says:

    One single line can do it, and you can put it in your batch file:

    powershell "Import-Module ServerManager; Add-WindowsFeature as-net-framework"

  26. avhacker says:

    one single line can do it, and you can put it in your batch file:

    powershell "Import-Module ServerManager; Add-WindowsFeature as-net-framework"

  27. Gyanendra says:

    I am also facing the same problem . and when I check in server manager it shows 3.5 is already installed. But  I run your command from command shell but problem is remain same. Please help me…

  28. Daniel Comp says:

    Thanks – funny how such a 'simple' thing can stop the whole show!

  29. David Borojevic says:

    Thanks – your first sentence answered my question after looking through various forums where others were also confused by inconsistent naming conventions for ,net;   many replies were from others thinking they knew the answer were just adding confusion:

    The .NET Framework 3.5 SP1 (also referred to as .NET Framework 3.5.1).


  30. Dattatraya says:

    you can uninstalled .net3.0 and 2.0  and install It

  31. Jamel says:

    Thanks for this little helpful post !

  32. Ian says:

    Most painless solution I found for Server 2008 R2 is,

    "ocsetup.exe NetFx3"

  33. Edgard says:

    Hi everyone, My name is Edward, I need a hand to the community, the thing is that I need to install a Web project Designed with MVC, which use the Framework meadow, detail is that I need to install it on Windows Server 2008, which should lift through iis7, where this and I have it set. I have everything you need (Prado, PHP, MySQL server, phpMyAdmin), just missing lift on the server where I try but I can not … Greetings and thanks …

  34. sqlnut says:

    How do I enable framework 4 when 3.5 is currently installed?

  35. Burak says:

    Loving that command lines! It is too easy. Thanks.

  36. vaishali says:

    plzz suggest me a dot net framwork package for windows starter 32 bit!! plzz mail me the details in…plzz i need help..coz i for JDBC im not able to connect sql server 2008 r2 express and netbeans..

  37. RIchard says:


    a nice hint, however enabling .net requires Windows Updates to be enabled. In my environment our servers are never connected to the internet and Windows Updates are disabled by default becuse of the risk of screwing up the system.

  38. Ajit Surana says:

    Run the command prompt as an Administrator.

    Type the following command. It should install the .NET 3.5 SP1

    powershell Import-Module ServerManager;Add-WindowsFeatures as-net-framework

  39. I'v solved the problem,thanks a lot!

  40. George says:

    Worked perfectly!



  41. emilk says:

    🙂 funny..

    Isn't it way easier to run powershell -NonInteractive … from command-line (batch)?

  42. DanSpec says:

    Ok, this took me a while to figure out. I wanted to push this job out to my 2008R2 systems without enabling scripts or using an .exe. When I called powershell with a batch file it would run in 32x mode and fail. So with some googling and testing I was able to get the following to work.

    Create a vbs script using the code below. Then call it with cscript scriptname.vbs (I left the -noexit so I can tell if it ran or not – your mileage may vary)

    Set objShell = CreateObject("Wscript.Shell")

    objShell.Run("%windir%sysnativeWindowsPowerShellv1.0powershell.exe -noexit Import-Module ServerManager;Import-Module ServerManager")

  43. To install from batchfile says:

    dism /online /enable-feature /featurename:NetFx3


    start /w ocsetup NetFx3

  44. jason says:

    In my windows 2008 r2 it shows dot net framework 3.5.1 installed, But I couldn't see that in application pools. I did the powershell option but it wont help, the following output shows up

    Success Restart Needed ExitCode  Feature Result

    ——-         ————– ——— ——————

    True          No                       NoChan… <>

    any idea ,

    thanks for your help

  45. Malar says:


    We are moving from dotnet  server 2003 to Dotnet server 2008 R2. But find some issues like we didnt get the homepage images in dot server 2008 R2 environment. Can anyone help me on this issue?

  46. AC says:

    Sweet article. Simple step by step and direct to the point I've been trying to install a program into my new 2008 R2 server and it kept giving me issues becuase it can not initialize .net app. Removed new program and re-installed – working like a charm. Thanks!

  47. Jesse says:

    what is the powershell install for .net 4?

    guessing it is similar to "Add-WindowsFeature as-net-framework" but different 🙂

  48. vikas says:

    How can I run above code if there is no .net installed on the machine 🙂


    After 2 hours I found this article. Thank you anyway. This has sorted my problems.

  50. Jason B says:

    these methods are not helping me out here.  I am still only seeing the feature of .net 3.0.  are there any other options to getting this feature available?

  51. Tray says:

    From a batch file this should work:

    c:windowssystem32ServerManagerCmd.exe -i AS-Net-Framework

  52. ahmsal1984 says:

    using System;

    using System.Diagnostics;

    namespace PrerequisiteHelper


    class Program


    static void Main(string[] args)


    ProcessStartInfo startInfo = new ProcessStartInfo();

    startInfo.FileName = "powershell.exe";

    startInfo.Arguments = "Import-Module ServerManager ; Add-WindowsFeature as-net-framework";

    startInfo.WindowStyle = ProcessWindowStyle.Hidden;

    startInfo.UseShellExecute = true;

    Process p = new Process();

    p.StartInfo = startInfo;







  53. Hi,

    is there any way to enable it, using a batchfile? i'm creating an install batch file, which installs SQL 2008, and .NET 3.5 on my servers. But some of the servers are under Windows 2008. installing .NET fails on them. What i have to do is what you said above. But I should do it using Batchfile. Would you please tell me how to do that?

  54. rene ortuño says:

    this works like a charm i made it in both ways and worked perfect thanks again

    best regards

Skip to main content