Home » 2014

Yearly Archives: 2014

Lync 2013 Complete Lab Guide Using Single Public IP Address – Part 3 – Building the PBX

In Part 2 we built the raw components for a Lync deployment. Before we create Lync we first need a PBX system if we are going to use enterprise voice. The PBX chosen for this lab is Elastix 2.5 which is an open source pbx system available for download here: http://www.elastix.org/index.php/en/downloads.html

In order to process calls to and from the PSTN we will also need a hosted SIP account with an online SIP provider. For this lab I have chose to use SIPGATE as the sip provider, http://www.sipgate.co.uk

Please sign up for your own account with them. It is free to sign up and use the service for inbound calls. You can also make calls to freephone numbers without charge, so is perfect for testing a simple EV deployment with Lync.

This part assumes that Elastix has been installed to PBX01, configured with the IP address and you have your Sipgate account information.


Create vCard From Active Directory

I had a requirement to export all users’ contact information from active directory to vCard so they could be imported into a mobile phone.

Turns out it is really easy once you understand the VCARD formatting. Run the following script from a server or workstation with AD Powershell Module

Import-Module ActiveDirectory
$vCardPath = "C:\mobile.vcf"
#test to see if vcard file already exists
$outputvcard = Test-Path $vCardPath 
If (!$outputvcard){
 #if not then create the file
 $outputvcard = New-Item -Path $vCardPath -ItemType File -Force
#get AD users
$ADUsers = Get-ADUser -SearchBase "OU=My users,DC=domain,DC=com" -Filter {(ObjectClass -eq "User") -and (Enabled -eq $true) } -Properties * | Select givenName,SN,Mail,Mobile,OfficePhone 
ForEach ($user in $ADUsers){ 
 Add-Content -Path $vCardPath -Value "BEGIN:VCARD"
 Add-Content -Path $vCardPath -Value "VERSION:2.1"
 Add-Content -Path $vCardPath -Value "N:$($user.SN);$($user.givenName)"
 Add-Content -Path $vCardPath -Value "FN:$($user.givenName) $($user.SN)"
 Add-Content -Path $vCardPath -Value "ORG:Company name here"
 Add-Content -Path $vCardPath -Value "TEL;WORK;VOICE:$($user.Mobile)"
 Add-Content -Path $vCardPath -Value "TEL;HOME;VOICE:$($user.OfficePhone)"
 Add-Content -Path $vCardPath -Value "ADR;WORK;PREF:Street Address here;Postcode;City;UK"
 Add-Content -Path $vCardPath -Value "EMAIL;PREF;INTERNET:$($user.Mail)"
 Add-Content -Path $vCardPath -Value "END:VCARD"

Once finished copy the vcf file to your mobile phone and import.

Exchange 2013 OAB Download Error (0x80190194) : ‘The operation failed

Recently I had an issue where users could not download the offline address book using any version of outlook. The error users report is Task ‘email’ reported error (0x80190194) : ‘The operation failed

There are many blog posts on the net that give different fixes for this error but in my case the problem still persisted.

I was able to observe the OAB files being updated on the server, I was able to browse the OAB.xml file from the client web browser, Outlook Test Connection returned the correct OABURL in the XML response. There were no errors on the client or server side event logs that suggested any hint of an issue. After a day of frustration I found the cause of the problem through off-piste troubleshooting which turned out to be corrupt arbitration mailboxes.

I should probably state that this environment was a migration from 2007 to 2013 previously so I think that perhaps the migration did not go that smoothly, but exchange quietly hid the issue.

Anyway to fix the issue this is what I did


Forcing SYSVOL Replication using DFS-R

To force SYSVOL replication between domain controllers you can use DFSR (DFS Replication tools feature required)

dfsrdiag syncnow /RGName:”Domain System Volume” /Partner:<partner dc> /Time:15 /v

Lync 2013 Complete Lab Guide Using Single Public IP Address – Part 2 – Building the Pre-requisites

In Part 1 we covered the basic physical, virtual machine and networking setup. In this section we will build the domain, install certificate services, office web apps server and exchange 2013. Please note that these setup processes will not be a deep dive step by step guide and will expect you to have a base knowledge of all technologies discussed.

Building the Domain

On the VM DC01 install Active Directory Domain Services and DNS roles. Once installed promote DC01 to a domain controller. Remember to name your Active Directory Domain the same as your external Public domain name. Once promoted reboot the server and continue to configure DNS. There are several DNS records internally required for Lync 2013 and these need creating manually in the AD DNS Zone. Add the following DNS records to the AD Zone:


Lync 2013 Complete Lab Guide Using Single Public IP Address – Part 1 – Setting Up the Lab

The following guides will walk you through setting up a complete, fully functional Lync 2013 Standard Edition deployment complete with Enterprise Voice, Remote Access, Mobility and Exchange Integration. Before we embark on this it is important to understand that this is for Lab purposes only and should not be used in any production deployment.

At times this guide will deviate from Microsoft Best Practices in order to achieve the end goal of emulating a deployment in the real world. I think it is a good idea to outline these now before we start so that you are aware

Guide Liberties

  • We will be using only 1 public IP address instead of the minimum recommended of 2 for the simple reason, I only have one
  • We will be installing the Lync Edge Server in the same LAN segment as the front end server because my lab kit does not support multiple network segments
  • We will be using non standard ports for some services in order to achieve a fully featured environment
  • We will be using our own Certificates from the Internal CA for external access because I am not spending money on proper certificates in a Lab

To begin this Lab, lets start with the basic requirements


Move Arbitration Mailboxes to New Database

To Move all the hidden system mailboxes from a database to another (or arbitration mailboxes) use the following powershell commandlet in EMS

Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase <target databse>


Lync 2013 Edge Server Prerequisites

To install the required server roles for a Lync 2013 Edge server, run the following in Powershell

Add-WindowsFeature Windows-Identity-Foundation

Lync 2013 Front End Server Prerequisites

To Install Lync 2013 required server roles use the following powershell

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, Telnet-Client, BITS, Desktop-Experience -Source D:\sources\sxs
Add-WindowsFeature Windows-Identity-Foundation

Please note you will need the Server 2012 setup disk mounted in D to install Net Framework 3.5 features

Presence Status Not Displaying in Outlook 2013 when using Lync 2013 Client

When installing Lync the other day I came across an issue where certain users could not view presence status of users in Outlook 2013. When investigating this I found that all users had the exact same version of Office 2013 with the same updates but some users were seeing presence just fine. I concluded that it must be a common issue with the local machines rather than the Lync server so I began to try and find the common link between each affected user. It turned out that the users affected were part of the Cisco Voice team. I also found that each of these users had Cisco Jabber installed, or had been installed at one point.

It turns out that it was a user profile issue where the Cisco Jabber whether it was installed or not had been set as the Default IM App Provider. This is read by Outlook 2013 to determine presence.

In order to resolve this I needed to change this. I found the offending registry key

HKCU/Software/IM Providers

Change the DefaultIMApp String Value from Cisco Jabber or whatever it is to Lync

Restart Outlook and presence will be shown.

If you have to modify this for a large number of users then perhaps a user logon script to address this would be a better approach

reg delete "HKEY_CURRENT_USER/Software/IM Providers" /v DefaultIMApp
reg add "HEY_CURRENT_USER/Software/IM Providers" /v DefaultIMApp /t Reg_sz /d Lync

Obviously the user executing this script should be able to modify the registry. As it is HKCU there should be no massive issues in doing this

%d bloggers like this: