Installing IIS Role Services for Lync Server 2013

Update 3/17/13 - Added information about .NET 3.5 installation error on Windows Server 2012.
Update 9/19/12 - Added HTTP Activation for Windows Server 2012.

Update 7/20/12 - Added Dynamic Content Compression and additional information for Windows Server 2012.

The following IIS role services must be installed before attempting to install this product:

  • Web Server
    • Common HTTP Features
      • Static Content
      • Default Document
      • HTTP Errors
    • Application Development
      • ASP.NET - (Note: For Windows Server 2012, ASP.NET 3.5 & ASP.NET 4.5 are required.)
      • .NET Extensibility
      • Internet Server API (ISAPI) Extensions
      • ISAPI Filters
    • Health and Diagnostics
      • HTTP Logging
      • Logging Tools
      • Tracing
    • Security
      • Windows Authentication
      • Client Certificate Mapping Authentication
      • Request Filtering
    • Performance
      • Static Content Compression
      • Dynamic Content Compression
    • Management Tools
      • IIS Management Console
      • IIS Management Scripts and Tools

  • .NET Framework 4.5
    • WCF Services
      • HTTP Activation - (Note: Required for Windows Server 2012/2012 R2.)

To make installing the role services easier, here are the PowerShell commands.  For Windows 2008 R2 SP1, open a PowerShell command window as Administrator and run the following commands:

Import-Module ServerManager
Add-WindowsFeature Web-Static-Content,Web-Default-Doc,Web-Http-Errors,Web-Asp-Net,Web-Http-Logging,Web-Log-Libraries,Web-Http-Tracing,Web-Windows-Auth,Web-Client-Auth,Web-Filtering,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Console,Web-Scripting-Tools

For Windows Server 2012/2012 R2, open a PowerShell command window as Administrator and run the following commands:

Import-Module ServerManager
Add-WindowsFeature Web-Static-Content,Web-Default-Doc,Web-Http-Errors,Web-Asp-Net,Web-Asp-Net45,Web-Http-Logging,Web-Log-Libraries,Web-Http-Tracing,Web-Windows-Auth,Web-Client-Auth,Web-Filtering,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Console,Web-Scripting-Tools,NET-WCF-HTTP-Activation45

Note: On Windows Server 2012/2012 R2, you may get the following error message when you try to run the Add-WindowsFeature cmdlet above:

Add-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be downloaded.
Use the "source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see Error: 0x800f0906

This is because the .NET Framework 3.5 is not included in Windows Server 2012/2012 R2 and needs to be either downloaded from Windows Update or you need to provide the location to the Windows Server 2012/2012 R2 installation media.  You can read more about this in the Error codes when you try to install the .NET Framework 3.5 in Windows 8 or in Windows Server 2012 KB article.  To provide the location of the Windows Server 2012/2012 R2 installation media, run the Add-WindowsFeature cmdlet from above and add the -Source parameter with the location of the Windows Server 2012/2012 R2 installation media, i.e -Source D:\sources\sxs.

Comments (14)
  1. dodeitte says:

    @Techie Bahraini

    Thanks for the feedback!  I updated the post to reflect this.

  2. Ron says:

    Dodiette, You have consistently helped with my Lync 2013 installation issues.  The Powershell commands were terrific. Thank you.  Fantastic stuff.


  3. daniel says:

    big thx for the script!!!!

  4. Bogdan says:

    ty very much for the help!

  5. Amir says:


  6. Battogtokh says:

    BIg thanks. Like it

  7. Techie Bahraini says:

    When running on a Windows 2012 server, the cmdlets fails as the .Net 3.5 will not get installed automatically. The source path needs to be provided. Insert the Windows 2012 ISO and run the command below

    dism /online /enable-feature /featurename:netfx3 /all /source:d:sourcessxs

    D is the DVD drive on this machine. change is accordingly and then run the cmdlets mentioned above.


  8. Jason says:

    Thank You very much for sharing this valuable info! Saved me a lot of time and aggravation! Sending good Karma your way!!! =-)

  9. mike says:

    Great job thanks a million!!

  10. serhatcalik says:

    thanks that is working and windows server 2008 r2 sp1 shel command is very good for me thank you very much ))

  11. Akbar says:

    Thanks for the shell cmdlet, it was very helpful

  12. Admiral Akbar says:

    It’s not a Trap!!!! Thanks!

  13. Adam Wisecup says:

    Great script!

  14. Renga says:

    Thank you very much. Nice article.

Comments are closed.

Skip to main content