Patching Lync Server 2013 Frontends

We finally implemented a complete HA solution at work for Lync Server 2013. This includes three frontend servers. This allows us to perform maintenance on the frontends with very little end user impact. When applying Windows Updates to Lync Server 2013, you should always follow Microsoft’s advice at this article. Having said that, here are a couple powershell commands you can use to make stopping the services on the frontends easier.

Perform the following steps after issuing the command Get-CsPoolUpgradeReadinessState and following Microsoft’s recommendations.

  1. The first command allows you to set all services into a manual startup state. This is necessary in case a server needs to be rebooted multiple times to apply updates.
    Get-CsWindowsService | Set-Service -StartupType Manual
  2. Next, stop all the services gracefully. This allows steady draining of connections.
    Stop-CsWindowsService Graceful
  3. Apply all the updates you need and reboot as necessary. If you have a three frontend setup, you can keep one frontend down for as long as necessary, provided neither of the other two fail.*
  4. Once all updates are applied, start the services.
  5. Now, we can set the services back to delayed automatic startup.
    Get-CsWindowsService | %{"sc.exe config " + $_.Name + " start= delayed-auto" | Invoke-Expression}
    Note that the above command is a bit more complex than the counterpart that sets all services into manual mode. This is because the Set-Service cmdlet doesn’t have functionality for delayed automatic startup.

I hope that helps. I found it was going to be tedious opening the services MMC and setting each service to manual individually and reversing that.

* In Microsoft’s Lync Server supported topologies article, it is noted that in a three server farm, if the number of frontends drops below two, the remaining frontend goes into survivability mode and stops Lync services after five minutes. Keep that in mind when planning maintenance.

X-UA-Compatible and Internet Explorer 9

Anyone who has done a bit of web development knows that getting a website to render the same in a bunch of different browsers, and different versions of the same browser can be difficult.

The firm I work for recently rolled out a new website. We hired a company to do the branding, design, and even hosting of the site. The results were awesome. Unfortunately, we ran into a situation with some of our computers (and some of our clients’ computers) in which Internet Explorer 9 would insist on rendering the page in compatibility view.

Microsoft’s suggested fix is to add the following tag in your HTML <head> section:

That works great, most of the time. However, for some reason, IE9 would just flat out ignore this tag on our website.

The solution was to add it to the HTTP Response Header. This can be done a variety of ways. On one of my websites, running Apache, I placed the following in the site’s config. This can be done with a .htaccess file, or in the configuration for the site.

If your site runs off of PHP, you could even use the PHP header() function to accomplish the same.

Moving this to the HTTP response headers appears to be more reliable and consistent than adding it as a <meta> tag in your HTML.