There are lots of articles on the internet explaining how to do this task, but almost for my own ease of access I have decided to write one of my own so I have it to hand! So below I have written an handy guide on how to install all of the prerequisites for Lync Server 2013 on Windows Server 2008 R2. I will likely follow this up later with another article for installing on Windows Server 2012 as well.
First of all you need to install of the Windows roles to your server. This can be done with only a couple of lines of PowerShell as below:
Import-Module ServerManagerAdd-WindowsFeature RSAT-ADDS, Web-Server, Web-Static-Content, Web-Default-Doc, Web-Http-Errors, Web-Asp-Net, Web-Net-Ext, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Http-Logging, Web-Log-Libraries, Web-Request-Monitor, Web-Http-Tracing, Web-Basic-Auth, Web-Windows-Auth, Web-Client-Auth, Web-Filtering, Web-Stat-Compression, Web-Dyn-Compression, NET-HTTP-Activation, Web-Asp-Net, Web-Mgmt-Tools, Web-Scripting-Tools, Web-Mgmt-Compat, Telnet-Client, BITS, Desktop-Experience -Restart
This will automatically restart your server, and after the roles are installed there are some additional steps.
First you must install the Windows Identity Foundation from the link here. When prompted select the option highlighted below:
Download and install the update.
You will then need to download and install the Windows Management Framework 3.0 to install PowerShell 3.0 (a requirement for Lync Server 2013). This is obviously due to the fact that Windows Server 2008 R2 only comes with Windows PowerShell 2.0 installed by default. The installer can be downloaded from the link here. Again, when prompted select the option highlighted below:
Once the file is downloaded run and install the update.
Finally, you may be required to install an update for Windows which resolves an issue with Lync Server. I would recommend installing the update if possible as a precaution. This update can be downloaded from the link here.
Once the above steps have been completed you should be able to run the Lync Server 2013 installation without any issues!