Lync Server 2013 Pre-requisites

I have been building labs for Lync Server 2013 and needed to quickly install the pre-requisites for Lync Server 2013 for the Front-End roles again and again. Here is the PS cmdlet that I use which might come in handy for others as well:

Add-WindowsFeature MSMQ-Server,MSMQ-Directory,Web-Server,Web-Static-Content,Web-Default-Doc,Web-Scripting-Tools,Web-Windows-Auth,Web-Asp-Net,Web-Log-Libraries,Web-Http-Tracing,Web-Stat-Compression,Web-Default-Doc,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Http-Errors,Web-Http-Logging,Web-Net-Ext,Web-Client-Auth,Web-Filtering,Web-Mgmt-Console,Web-Asp-Net,Web-Dyn-Compression,Web-Mgmt-Console,Windows-Identity-Foundation,rsat-adds,telnet-client,net-wcf-http-activation45,net-wcf-msmq-activation45,Server-Media-Foundation

Please note, that if you are installing Lync Server 2013 on the new Windows Server 2012 (as you should be), you may run into problems with pre-requisites and get the following error:

 Error: Prerequisite not satisfied: The following Internet Information Services (IIS) role services must be installed before attempting to install this product: Static Content, Default Document, HTTP Errors, ASP.NET, .NET Extensibility, Internet Server API (ISAPI) Extensions, 
ISAPI Filters, HTTP Logging, Logging Tools, Tracing, Client Certificate Mapping Authentication, Windows Authentication, Request Filtering, Static Content Compression, Dynamic Content Compression, IIS Management Console, IIS Management Scripts and Tools Prerequisite
 not satisfied: Before you install Microsoft Lync Server 2013, you must install Microsoft ASP.NET 4.5 by using the Add Roles and Features Wizard in Windows Server 2012 Server Manager. Install the ASP.NET 4.5 role service of the Web Server (IIS) role. Prerequisite not satisfied: 
Before you install Microsoft Lync Server 2013, you must install Microsoft Windows Communication Foundation Activation by using the Add Roles and Features Wizard in Windows Server 2012 Server Manager. Install WCF Services and HTTP Activation, which are included with 
the Microsoft .NET Framework 4.5 feature. Prerequisite not satisfied: You must install the Media Foundation feature or Desktop Experience feature of Windows before attempting to install this product.
 ▼ Details
└ Type: MultipleBlockingPrereqException
└ ▼ Stack Trace
└
at Microsoft.Rtc.Internal.Tools.Bootstrapper.BootstrapperTask.CheckAndInstallPrereqs()
at Microsoft.Rtc.Management.Internal.Utilities.LogWriter.InvokeAndLog(Action action)

Unfortunately, the error above does not indicate the real problem. You have to ensure that you have installed .NET 3.5 for the installer to succeed, you will need connectivity to the internet. If that is not possible please refer to the following MSDN article for installation steps: https://msdn.microsoft.com/en-us/library/hh848079%28v=vs.85%29.aspx.

 Hope this helps someone out there.