7 August 2014

Install-CsDatabase : Command execution failed: Cannot find any suitable disks for database files.


The issue was seen when installing the latest CU. When installing the SQL part of a cumulative update you get the error:-

Install-CsDatabase : Command execution failed: Cannot find any suitable disks for database files. You must manually specify database paths.


The "suitable disks" error is triggered by the installer checks. The requirement is that a minimum of 16 GB of free space is available prior to installing\updating SQL. Simply cleaning up the drive where CSDATA lives to free up space gets it sorted.

25 July 2014

Office Web Apps Server Error


After following the basic install procedure I attempt to look at the Office Web Apps Farm configuration with the PS command Get-OfficeWebAppsFarm.
The following error is thrown..

Although many blogs explain that this issue is related to installing on a different drive than C, or that its specific to Windows Server 2008 or 2012


I found that (IMHO) the issues was unrelated to installation path or server version. Instead it appears to be an issue with the ASP.NET installation\registration with IIS.

This can be reinstalled\registered with the following command

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

-ir - Installs ASP.NET and registers with IIS

Re-running Get-OfficeWebAppsFarm now works as expected

15 July 2014

Cant set port on IP/PSTN Gateway

There are some really good resources available on how to setup SIP trunking between Lync and Microsoft Certified gateways (such as Sonus and Audio codes).
One of my favorite resources is from Iain Smith at NorthernLync found here


Unable to set the port to 5061 when adding a PSTN gateway in Lync Topology builder.

Notice how finish is grayed out and we have an error next to the port.


The reason we have this is because by default the mediation servers are set to use TLS and thus listening on port 5067 and TCP isn't enabled. You can check this by expanding the Lync Server 2013 -> Standard Edition\Enterprise Edition. Right click on the Front End where the Mediaiation service is co-located and select Edit Propoerties

Scroll down to the Mediation Server details to see the Mediation Server configuration


Simply enable TCP by checking the check box and set the port range

Returning to the PSTN Gateway folder in Topology builder and selecting New IP/PSTN Gateway you will notice that you are now able to add the gateway as TCP using port 5060

Lync Management Shell not connecting


I came across an interesting issue yesterday..opening the Lync Management Shell I was presented with a blank shell window (nothing unusual there, just wait a few seconds, right?). However it just stayed right there, no connecting.

The environment is really a 4 site deployment with a total of 4 2013 front ends all running on Windows 2012 R2.

What was really interesting was that there was no errors, nothing...

I fired up power shell and tried importing the Lync module just in case my Lync Server Management Shell shortcut had somehow been corrupted and that worked fine.

So off to have a look at the shortcut I noticed that the decided to fire up the target manually in an attempt to isolate the culprit

Looking a little closer at the target I discovered that the closing quote was missing. Now how did that happen? 

Interestingly this issue happened on 2 of the 4 front ends within the same deployment. I have done many of these and not seen this before so am not sure what the underlying cause is. Perhaps a bug :-)


Simply edit the target and add the missing close quote as seen below.

Ripleys- Believe it, or not
I went back to the Front End where the Lync Management Shell was working..to my disbelief its target is missing the closing quote BUT it works anyway. Adding the closing quote to the working target made no difference. Unbelievable.
Go figure..

Of course you can simply fire up Power Shell and then import-module Lync

27 June 2014

Removing stale Lync references from AD


The old Lync 2010 Server\Pool was discovered when running ExchUCUtil. The image below depicts the 2 Pools I was expecting to see 1:2 and 1:1 BUT I wasn't expecting 1:4.

So when Lync is initially deployed a bunch of references are made in AD, of course if you remove Lync from the environment and don't do so gracefully then a bunch of unwanted references are ..still in AD.
 So far I haven't seen any other issues due to AD objects still referencing the old Lync 2010 Pool other than whats seen in the screen shot above, but (not being OCD of course) it needs to go as its messing with my Nirvana.


A deep dive into AD to remove the reference to the Lync 2010 Server\Pool showing up here as 1:4. 
ADSIEdit to the rescue in this case. We will need to find the specific references which will refer to servers and pools in Global Settings, Pools, Trusted MCUs, Trusted Services and Trusted WebComponentsServers.

So lets go and find these references then..
Open LDP by typing ldp in the run box and click OK

In the Connection window type the name of your DC in the Server Box and click OK

Select Connection - Bind

You need to Bind as a valid user,either use the currently logged on user, or specify an account with credentials

Next we need to view the tree

The BaseDN will depend on where the information is stored as follows:-
  • DC=domain,DC=com (information in System Container)
  • CN=Configuration,DC=Domain,DC=COM (information in Configuration

We need to drill down to the RTC Service container. Just a note that when you first see this view there is no indication that the container objects can be expanded, go ahead and double click on them anyway :-)

We can now search for the old server references. Right click on the RTC Service container and select search

Enter the following string in the Filter box (replacing the OldServerFQDN with the actual FQDN of the old server)

NOTEReturn to this step and do another search using the following 2 string formats to find Trusted Server and Trusted Web components:-

Be sure to select Subtree so it searches all the trees below this entry. Then click run.
The search should return results in the righthand pane.

You can easily spot the results as they start with ***Searching...

In the image below you will notice that my environment found 2 entries

Be sure to make note of these results because they will be required to find them in ADSIEdit.

Next we will open ADSIEdit and connect to the configuration. The path to each CN is noted in the search we did just before so it really simple to find them.

In my example above I found both the containers and the 1:4 that was discovered when setting up UM (bonus..)

Before deleting each of these review them by looking at the properties and confirming that they are OK to delete. A tell tale is the references to the individual services and the machines they run on seen in the differentTrustedServicePort and ServiceType attributes

To delete simply navigate to the full DN, right click and select delete

At this point you could return to the search in ldp and perform additional searches for 
Trusted Server and Trusted Web components.

Running ExchUCUtil now shows just what I expected..

1:4 Gone!
Peace restored

25 June 2014

Lync Share permissions


From time to time you may find that the deployment wizard fails at setting the permissions required to the Lync Share folder.

Product Version - Lync 2013

What permissions are required?


Usually running the Topology builder as Administrator does the trick
Alternatively you could manually set the permissions from the Advanced Sharing button

16 April 2014

Solving Invalid_AD_Phone_Numbers.txt

OK so if you are OCD (and nothing wrong with that) then you may be compelled to make the event warning on your front end reporting on Invalid numbers every morning just after 1:30 am.

The Event ID 21034 explains as follows:

Its arguably one of the most comprehensive and helpful Cause and Resolution events you may ever see!

The Process
When Lync collects the user data from Active Directory a number check is done and only numbers that conform to the E.164 numbering format (I have noticed that an E.164 number with a x1234 on the end is also permitted by default) are imported. Hence the errors..

So looking into the text file (located at Lync File share...1-WebServices-1\ABFiles\00000000-0000-0000-0000-000000000000\00000000-0000-0000-0000-000000000000\ called Invalid_AD_Phone_Numbers.txt)
What do we see?

Edited for simplicity I have shown below just a sample of the  culprits.

Unmatched number: User: 'sip:peter.pan@lyncsorted.co.nz'  AD Attribute: 'telephoneNumber'  Number: '095504321'
Unmatched number: User: 'fb56a490-0e27-4cac-b6cc-fb17ae0d4dba'  AD Attribute: 'telephoneNumber'  Number: '1234'
Its VERY common to see entries with the strange SID looking user name, these are usually disabled accounts and can be hard to find the true user attribute. I usually do an advanced search and use the number attribute provided to find these. By the way, they do no harm just sitting there, its the valid accounts I concern myself with.

The number assigned to Peter Pan above is valid (but not an acceptable default format). To format this number to a recognised number for populate the Lync Address Book service a normalization rule set can be created. 
All numbers that do not comply to the E.164 format by default will parse through the AD normalization rule set to be transformed to E.164 (or any format you allow in the regex)

Do make sure that Lync ABS is configured to use this normalization rule set with the Lync Server Management Shell command:-


The name and location of the AD Normalization rule set is essential. The rule set must be called Company_Phone_Number_Normalization_Rules.txt and must be located in the central Lync File Share …\LyncShare\1-WebServices-1\ABFiles\

The contents of this txt file are documented in the table below:

## Sample AD Normalization rule set for populating AddressBook Service
##Created by PaulB
##Normalise to E.164
##Local format from Active Directory into E.164
##Auckland (New Zealand) National Prefix (9) & Country Code added as +649 (and 6 or more digits)


##National format from Active Directory into E.164
##New Zealand Country Code added as +64 and dropped 0 (and 6 or more digits)


##No DID, extension number only
## Assuming 4 digit extension and passing through to ABS transparently


Once the rules are added you can test by using ABServer.exe
ABServer.exe can be found at C:\Program Files\Microsoft Lync Server 2013\Server\Core (assuming default install directory)

Run ABServer.exe in the Command prompt window in the following format
 in the following format (where 095501234 represents the number to test)

ABServer.exe -testPhoneNorm "095501234"

In the below image I have run a valid number test not requiring additional normalisation, followed by a National format number. Notice how the first number (+6495501234 x5234) normalises to the expected line URI format used in Lync. It also mentions that the rule was matched by built in ABServer.exe rules

The Second test was in the national format (095501234), this was normalised by our Company_Phone_Number_Normalization_Rules.txt file to the Line URI +6495501234 as required.

Now to get the AddressBook syncrosised to Lync

From Lync Server Management Shell run:-

Update-CsAddressBook -verbose
Before adding these rules the non complying numbers don't show up in the users contact card, once the rules are in play and the address book has regenerated then the contact card show the numbers loaded from AD in the new accepted format.

Before                          After