Install Lync Server 2013 prerequisites on Windows Server 2008R2, Windows Server 2012 and Windows Server 2012R2

Updated: Dec 16, 2012

Lync 2013 is out, along with a new set of demands to install it right on your Windows Server.

Here’s how to get it done:

Windows Server 2008R2:

First, install the roles and features required:
Import-Module ServerManager
Add-WindowsFeature Web-Dyn-Compression,desktop-experience,RSAT-ADDS,Web-Server,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,Msmq-Server,Msmq-Directory

Then, Install .Net 4.5 Framework (Download).

Next, install Windows Identity Foundation (Download) and Windows Management Framework 3.0 (Download) that contains PowerShell 3.0.

You might also have to download and install KB2646886.

Windows Server 2012 and Windows Server 2012R2:

Make sure you have the Windows Server installation CD or source. It’s required to install ,Net 3.5 Framework.

Then, from an elevated PowerShell, run the following command:

Note: You don’t need to run “Import-Module ServerManager”, Windows 2012 loads the modules automatically

Add-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-WCF-HTTP-Activation45, Web-Asp-Net45, Web-Mgmt-Tools, Web-Scripting-Tools, Web-Mgmt-Compat, Desktop-Experience, Windows-Identity-Foundation, Telnet-Client, BITS -Source D:\sources\sxs

If your Windows Server 2012 installation source is not your D drive, change it to your desired location.

On Windows Server 2012R2 you should install Lync Server 2013 with at least CU3 (Download the latest here).

To avoid Event IDs 32402, 61045 on Lync 2013 Front End Servers (See KB2901554), run the following from an elevated command prompt:

Reg Add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\Schannel" /V "EnableSessionTicket" /D 2 /T REG_DWORD /F

Now you’re all ready to install Lync Server 2013.

Update Lync 2010 server from Evaluation to Production

I’m sure you had to install Lync 2010 at least once from the evaluation version (LSEVAL).

After a while (180 days, if you insist), you’ll have to ‘upgrade’ to the Production version. No re-installation needed, just follow these instructions:

1. Using Lync management shell, run the following command from the path of the Lync server installation:

msiexec.exe /fvomus server.msi EVALTOFULL=1 /qb

2. Using Lync management shell, run:

Enable-CsComputer

That’s it. Run this command on every Front-End Server, Directory Server and Edge Server you deployed using the evaluattion media.

Installing and configuring the Lync Server 2010 Mobility Update

It’s been out quite a while and it works just fine. Here’s how to enable users to communicate with Lync server from their mobile devices…

Prerequisites, clarifications and supported platforms:

  1. You must install Lync Server CU4 (KB2493736) for this to work. I usually download the LyncServerUpdateInstaller.exe file and let it automatically install all the needed updates. (If you have a more recent update – It’s already on there).
  2. You must download the “Microsoft Lync Server 2010 Mobility Service and Microsoft Lync Server 2010 Autodiscover Service” McxStandalone.msi. Don’t tempt to just run it now, we have a few things to do before that.
  3. Your Edge server is used only for push notifications, via Lync Online. You can run the CU4 installation tool there to update your server, but you must not install the mobility update on your Edge Srver.
  4. Your reverse proxy (ISA\TMG\UAG) or any other device you’re using for that matter is what we’ll use to publish this service. Infact, we use the meet.yourdomain.com publishing rule.
  5. If you feel like being useful, pre-publish a new external DNS A record called LyncDiscover.yourdomain.com and point it to the IP adsress of your ‘meet’ rule.
  6. I recommend using a trusted, valid, 3rd. party certificate on your reverse proxy server – it saves you loads of trouble.
  7. There are currently Lync mobile apps for WP7, Android, iPhones and iPads. I know not about any Symbian apps soon.
  8. There is something Blackberry-ish, Never saw it working.

So, Let’s get started.

Install the updates needed by launchig the Lync Server update installer from where you saved the file:

Once finished, the installer shows you you’re all good. It also saves the installation logs of every update in the folder from which you launced the installer.

After installing the updates, we need to update the system. We will use the following Lync Powershell command to do so. If you’re using a single standard server like me, your command should look like this:

Install-CsDatabase -Update -ConfiguredDatabases -SqlServerFqdn "FEServer.domain.local"

It should give an output lke this:

And end successfuly, like this:

Now we can start configuring the system for the mobility part. This will be done mostly by using the Lync Server Management Shell.

A prerequiste for this service to work is to have IIS Dynamic Compresion enabled. It can be quickly installed using two commands in Poweshell:

Import-Module Serv* (You can type the whole “ServerManager” command, but I always end up typing it twice so I’m getting lazy here…)

Add-WindowsFeature Web-Dyn-Compression

To configure the listening ports for the sevice, we will run one command twice, with two variables; the Primary listening port (internal) and the External listening port. These ports are documented in the Microsoft Lync Server 2010 Mobility Guide. To do that we will use the command “Set-CsWebServer” and provide our Front-end server’s FQDN and ports:

Set-CsWebServer -Identity FEServer.domain.local -McxSipPrimaryListeningPort 5086

Set-CsWebServer -Identity FEServer.domain.local -McxSipExternalListeningPort 5087

Then, we will update the topology using the followong command:

Enable-CsTopology

Now, remember I told you not to run the McxStandalone.msi file? here’s why: You should now take this file and paste it to the following location:

"C:\ProgramData\Microsoft\Lync Server\Deployment\cache\4.0.7577.0\setup" and just paste the file there:

After the file is there, you can either launch the Lync Server Deployment Wizard and choose “Setup or remove Lync server components”:

Or just go to the Lync Server deployment  folder (“C:\Program Files\Microsoft Lync Server 2010\Deployment”) and run the file “Bootstrapper.exe” This will install the update directly from the folder where we put it.

To view the log browse to your %tmp% folder and look for the latest Bootstrap-CsMachine log. If everything worked right, you will see a similar screen to this:

This tells you you have successfuly installed the service!

But we’re not done yet. If you used the Lync Server Deployment Wizard, don’t close it just yet. If not, this might be a good time to open it. We now need to generate a new certifiacte request and assign a new certifiacte for the Front-end server.

Why you’re asking? well, the answer will be revealed in the certificate wizard: If you look closely, you’ll see that two SANs were added automatically to the request: Lyncdiscover and LyncDiscoverInternal. They are added to every SIP domain configured in your topology:

You can now assign the certifiacte to your server and move on to the nest step:

 The service works now, you just need to configure the reverse proxy. But wait – what’s a mobile app without push notifications? Well… Setting that up is rather easy if you have Lync Federation enabled and is done by running four Powershell commands:

New-CsHostingProvider –Identity "LyncOnline" –Enabled $true –ProxyFqdn "sipfed.online.lync.com" –VerificationLevel UseSourceVerification

New-CsAllowedDomain –Identity push.lync.com –Comment “Mobile Push Notifications”

Set-CsPushNotificationConfiguration –EnableApplePushNotificationService $true –EnableMicrosoftPushNotificationService $true

Set-CsAccessEdgeConfiguration -AllowFederatedUsers $true

If you’ll check your Lync Server Control now, you’ll see you have a new provider:

And a new federation partner:

That’s it, configuration on the fron-end side is done.

Now, for your reverse proxy:

If you’re using TMG like I do, it’s rather easy. All you have to do is add “Lyncdiscover.youdomain.com” to the Public names and make sure you have c ertifiacte that corresponds to that name on your listener:

That’s about it.

Now, let’s test what  we just did:

I have a WP7 device and want to connect it to Lync. If everything was configured correctly, we will go through these steps:

I’ll launch the Lync on my phone, it will show me this screen:

I will now insert only my Lync sign-in address and  my password – this is all it takes for automatic sign in!

The app thinks for a while them launches the first screen:

It will ask you for your phone number – You can skip this step if you don’t have Enterprise Voice implemented:

Now it will ask you if you wish to enable push notifications:

And That’s it – you’re signed in:

How does push notifications look like?

Look at the top of the screenshot, this is what  you see when you get the message:

If you did not respond to the notification, the live tile will remind you you have one unread message in Lync:

Once you open the app, you will see the message:

That’s it, we’re good to go.

Lync not populating contact cards phone numbers from Active Directory (Or: How to normalize AD phone numbers for Lync Server 2010 and 2013)

** This article also works for Lync Server 2013!

 

You’ve seen it. The contact card in Lync shows you everything you entered in Active Directory, except for phone numbers. even when you know you have them there!

This can be quite frustrating, especially if you’re not yet connected with enterprise voive and clients want to pull all the relevant information from Lync during an IM session, including the other side’s phone numbers.

Here’s what you get:

Instead of seeing the relevant phone numbers from Lync like here (sort of…)

You’re getting a card that has no phone info what so ever:

As you can see, ‘test’ Springsteen here, has no phone info in his contact card.

Let’s take a look at Active Directory, see what’s configured there:

This can’t be right! All the information is there! Home, Mobile, even the Office phone is there.

How can we resolve this issue, even without implenenting Lync Enterprise Voice?

Let’s take a look at the event viewer to get some help.

If you scroll down the Lync server logs in event viewer, you’ll probably see event number 21034 generated by LS Address Book Server. It will tell you something like this:

“One or more phone numbers failed to normalize.

‘X’ total numbers failed to normalize.  They are listed in the text file: ‘\\<Lync Server Name>\<Lync Share>\1-WebServices-1\ABFiles0000000-0000-0000-0000-0000000000000000000-0000-0000-0000-000000000000\Invalid_AD_Phone_Numbers.txt’ Cause: One or more phone number attributes in Active Directory contained text that could not be normalized.  Normalization rules are contained in the optional Company_Phone_Number_Normalization_Rules.txt file located in the output location or in the generic rules built into Address Book Server.  Refer to the documentation for a description of the built-in generic normalization rules.  Use the ABServer -dumpRules command to see all the rules that Address Book Server is currently configured with.”

It looks like this:

If you press the path in the event propertis or browse to the file location in your server (always in the same place, in the same name), you will see the following:

What you get here is a list of the users and they’re phone numbers you thought were ok.

Why is this happening?

Well, Lync expects all the phone numbers in your AD to be in the E.164 format, meaning they should be +1-111-11111111 etc. If they’re not like this (as the example above shows us), you will have to normalize them if you want Lync to publish them.

How can I fix this?

Quite easily, to be honest. If you continue reading in event  21034, you’ll see the following:

“Either create a Company_Phone_Number_Normalization_Rules.txt file in the output location and make sure it covers all cases found in your Active Directory deployment or fix the invalid phone number(s) in the Active Directory record(s).”

You get a free advice – you don’t throw it away, do you? What Lync actually tells you, is to create  a file called “Company_Phone_Number_Normalization_Rules.txt” in the root of the AB folder of your Lync shared folder (Not in a sub folder, not by a different name, EXACTLY this one) – like it shows you here:

In this file, you must enter normalization rules according to your country code and other variables.

I used to freak out when I heard normalization rules, but fortunately the guys at Lync made it quite simple for us: I use the Lync Server Control Panel to generate and test my normalization rules. It’s really easy and fun to use – Just enter the details and copy the results. In the next example I created a rule to normalize our internal numbers:

I copied the “Pattern to match” and the “Translation Rule” from the wizard and copied them one line below the other (in the order they appear at the wizard) to the txt file I created. Note you can add “##” at the beginning of each line if you want to write comments.

This is how my file looks like at the end:

Now, all I have to do is run the “Update-CsAddressbook” command from Lync Management Shell and that’s it.

If you configured the rules correctly – you will see the results in your clients. It might take a while for the clients to download the updates, but eventually you’ll see it works perfectly:

Now you can call Bruce 🙂

Disable Lync 2010 First Launch splash screen

(…And one more tweak)

I’ve been looking for a way to lighten up the end user’s first dip into Lync 2010 client.

I found two things annoying:

  • Address book takes a while to update.
  • The first Launch splash screen can make the users brake their screen.

The solution is a very simple registry fix. I edited the following registry jey with two options:

1. The first hive Shortens the address book pulling delay to zero – meaning the client will immediatley download the address book.

2. The second hive tells the computer that the splash screen has already ran, so there is no need to run it again (this registry key is being added during the installation of Lync client, and sets itself to the ‘0’ value after the first run. pre-populating the registry with this key means the first launch tour screen will not run).

You don’t have to use both keys, but I run them together to achieve a smooth, quieter client-side installation:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Communicator]
"GalDownloadInitialDelay"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Communicator]
"FirstRunPlayed"=dword:00000001

Make sure you deploy this registry key to your clients prior to installing Lync client.

Lync Server Installation Error: Prerequisite installation failed: Wmf2008R2

Trying to Install Lync 2010 on Server 2008 R2 SP1, the installation failed with the following error while adding the first Lync Server Components:

Update: I Initially published this post in March, when I first encountered this issue.
My workaround was to rename the files names as you can see below if you read further.

The official workaround for this issue has been released in Microsoft KB2522454. To sum it up, you should run the following command before installing Lync and reboot:

%systemroot%\system32\dism.exe /online /add-package /packagepath:%windir%\servicing\Packages\Microsoft-Windows-Media-Format-Package~31bf3856ad364e35~amd64~~6.1.7601.17514.mum /ignorecheck

You can read further on if you wish….

It appears as if that file:
“C:\Windows\servicing\Packages\Microsoft-Windows-Media-Format-Package~31bf3856ad364e35~amd64~~6.1.7600.16385.mum”
Cannot be found.
I looked for that file. It’s no where to be found. But it looks like it has a different version:

I copied the file name mentioned in the error message, changed both file names (both .cat and .mum, didn’t know if they need each other during installation) and tried installing again.

That Solved the problem:

I changed back the file names to their original names and restated the server – everything works fine.
Perhaps a Lync Server 2010 RU1 soon?