Search This Blog

Thursday, 15 March 2012

+44 Normalisation

…… or normalization, as some may say ! ! !

To keep to best practice in a Lync Server 2010 project it is always recommended that users numbers in AD are in RFC 2916 (E164) format. Obviously for a customer with many users this becomes a bit of a chore and one that is always nicely filed under “Customer Pre-reqs” in any project plan ! !

So I had a play with the fabled company_phone_number_normalization_rules.txt file ……… this should be stored in the ABFiles folder of the Lync share that is published as part of your topology. In my case ……. D:\LyncShare\1-WebServices-1\ABFiles

There is a sample file included elsewhere in the Lync Program Files folder. A lot of the samples given are complex and mean nothing. My scenario is reasonably simple; in the UK most numbers stored in AD are 11 digits long, ie National (01246 123 456), Mobile (07790 123 456) or Private (0870 123 4567). The one thing you do learn from the sample file is that a correct normalisation rule will get rid of trailing spaces, gaps, brackets etc (ie it only reads the numbers !)

So in my scenario, I wanted to automate the normalisation. Looking in the event viewer prior to playing, there were regular 21034 LSAddressBook warnings as below indicating:

I created the text file in the above location and added one simple line as follows:

##

## Normalize 11-digit phone number patterns from Active Directory into +E.164

##

(\d{11})

+44$1

This seemed to be mentioned on a couple of respected web sites and blogs but it didn’t work for me. I ran a update-CSaddressbook –force –verbose but alas only succeeded in receiving a warning 21034 as above. So I found the following on a blog specifically discussing UK usage:

## match National to UK E.164

\+?0([1-9]\d{7,9})

+44$1

This seemed to do the trick and my 21034 warning is now a lot better and the 4 “failures” relate to disabled accounts.

I could have been a lot cleverer and made more rules but this is simple enough in my current environment. Thanks to http://visualplanet.org/blog/?p=91

Obviously the parsing of this file at address book update time DOES NOT change any attributes of users numbers in AD, it merely helps Lync to see them in a way it understands (E164) so it can present them properly in the Lync client and contact cards etc …….

Hope this helps, I’ve always fancied having a bash.

Monday, 5 March 2012

Exceeded server limit for database copies

Situation
New DAG created, attempt to create copies for (6) databases. All create OK, but final 2 fail during seeding. Status is seen as "Failed and Suspended". A resume or update fails and warnings are generated:
"The database copy was automatically suspended due to failure item processing. At '7/5/201x9:01:14 AM' the copy of database '1234DB' on this server wasn't able to operate because the number of mailbox database copies on this server exceeds the supported limit. Recovery was not attempted."
The servers in question are activated and licensed for ENTERPRISE and manually adding the set-mailboxserver entry for maximum databases does not resolve the issue.

Resolution:
Via Exch Shell, run the following command: Set-ExchangeServer -ID -ProductKey
accept the warning (yellow) that the server is already licensed. Restart the information store and attempt to 'resume' or 'update' the copies.

Jobs a good 'un.


Wednesday, 18 January 2012

Easily Produce HTML GPO Reports Windows 2008 Powershell

Challenge
As part of any discovery or health audit, It`s never been particularly easy to cleanly export a viewable and searchable report on the configured and deployed Group Policy Objects and their  placement.



Solution
With Windows PowerShell you can now simply run a 1 line command that will export all GPO`s in a single swoop to a presentable HTML Report.

Simply follow the below steps to export ALL GPO`s into and single HTML Report.

1. From Powershell Import the GPO PSCommandlets -
    Run  import-module grouppolicy

2. Run the following command (Just changing the domain, DC and the output path)
Get-GPOReport -All -Domain mytestdomain.COM -Server test-DC3 -ReportType HTML -Path  C:\temp\GPOReportsAll.html 

Tuesday, 8 November 2011

Lync 2010 - “sorry, but i can't seem to connect you to your conference right now. please try your call again, goodbye

Scenario
Multiple Lync Standard edition servers / 3 x Central Sites / each with Edge Servers, PSTN Gateways, (In this scenario we have  multiple Cisco Call Manager CUCM)

Symptom
Dial In conferencing, multiple pools / regions.
You may create a new conference in which Dial in numbers connect to other pools other than the one you created your conference on.

In this scenario if you dial the local Conference server / Mediation server that hosts the dial in number, all is well,  However if you dial in to the conference from another pool / mediation server. Then you may receive the below announcement.

“sorry, but i can't seem to connect you to your conference right now. please try your call again goodbye"

Further debugging on (AVmcu,CAAServer, CASServer,SIPStack) you may see entries in the logs like:
"cannot transfer the call to another pool"
or
"sip/2.0 488 not acceptable here"
or
"reject the incoming dial out from mcu"



Resolution
The problem is with the "enable refer support" option on the Lync Trunk Configuration, Untick this option on your Trunks, and all will be well.
MS Tests show that Refer does not work in the case of Lync-to-CUCM integration. Some call transfer scenarios do not work with Refer support. 
Basically, that’s all we need for Direct SIP integration with CUCM.

Full Details on how to configure Lync 2010 and Cisco Call manager can be found in this great document by: Danny Cheung & Taimoor Husain
Integrating Microsoft Lync Server 2010 and Cisco Unified Communications Manager
http://blogs.technet.com/b/nexthop/archive/2011/07/17/integrating-lync-server-2010-and-cisco-unified-communications-manager.aspx

Thursday, 3 November 2011

Lync Server 2010 - SQL Express open failed | could not open file e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\model.mdf

Don't ask why, or How.. I have no Idea.  Anyway..  This cost me at least 6 hours of my life, and learning things about sql I never cared to know..(Sorry DBA`s)

Scenario
1 x Lync Server, Standard.  For testing  (EASY,  30 mins, done!!)

So at the beginning of the install, we put good old SQL Express on,  Job done..  REALLY,  Really !!! ?

So, when we try and Publish the CMS,  it fails, so restart SQL Server/ reboot
Further checking, in the event logs you will see fcb::open failed: could not open file e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\model.mdf
Even further digging into SQL Debug logs, you may find
watson bucket for exception based failure has been created  / external component has thrown an exception.

Anyway we can't start SQL or Install the CMS.  And after much , Much Head banging, a couple of tears of insane laughter and anger, I came across the below blog......,
I low and Behold.. The Client  supplied a DEBUG Version of windows 2008 R2..  SIigghhh :(


SQL Server 2008 Install on Windows Server 2008 fails with "External Component has thrown an exception

Friday, 30 September 2011

Lync Server 2010 - Configure Multi-Site Simple URL`s

Simple URL ScopeYou can configure your simple URLs to have global scope, or you can specify different simple URLs for each central site in your organization. If both a global simple URL and a site simple URL are specified, the site simple URL has precedence.
In most cases, Microsoft recommend that you set simple URLs only at the global level, so that a user’s Meet simple URL does not change if they move from one site to another. The exception would be organizations that need to use different telephone numbers for dial-in users at different sites. Note that if you set a one simple URL (such as the Dial-in simple URL) at a site to be a site-level simple URL, you must also set the other simple URLs at that site to be site-level as well.
You can set only global simple URLs in Topology Builder. To set a simple URL at the site level, you must use the Set-CsSimpleURLConfiguration cmdlet.

Example

We have 3 Global Sites, Each site requires to be autonomous from each geographical region. (i.e. if  the UK had a major failure, US, HK would not be effected.......

so we want to set each region with its local meeting and Dialin URL`s

Site 1 (USA) = https://lync.us.abc.com
Site 2 (UK)   = https://lync.uk.abc.com
Site 2 (HK)   = https://lync.hk.abc.com

Using Lync Powersehell we would need to run the following commands to create our site specific url`s.  (Red TXT = Change as required)

 $simpleUrlEntry1 = New-CsSimpleUrlEntry -Url "https://lync.uk.abc.com/dialin"
 $simpleUrlEntry2 = New-CsSimpleUrlEntry -Url "
https://lync.uk.abc.com/meet"
 
 $simpleURL1 = New-CsSimpleUrl -Component "dialin" -Domain "*" -SimpleUrlEntry $simpleUrlEntry1 -ActiveUrl "
https://lync.uk.abc.com/dialin"
 $simpleURL2 = New-CsSimpleUrl -Component "meet" -Domain "abc.com" -SimpleUrlEntry $simpleUrlEntry2 -ActiveUrl "
https://lync.uk.abc.com/meet"
 
 New-CsSimpleUrlConfiguration -Identity site:LYNC-UK -SimpleUrl @{Add=$simpleUrl1, $simpleUrl2}


 ---------------------------------------------------------------------------

 $simpleUrlEntry1 = New-CsSimpleUrlEntry -Url "
https://lync.hk.abc.com/dialin"
 $simpleUrlEntry2 = New-CsSimpleUrlEntry -Url "
https://lync.hk.abc.com/meet"
 
 $simpleURL1 = New-CsSimpleUrl -Component "dialin" -Domain "*" -SimpleUrlEntry $simpleUrlEntry1 -ActiveUrl "
https://lync.hk.abc.com/dialin"
 $simpleURL2 = New-CsSimpleUrl -Component "meet" -Domain "abc.com" -SimpleUrlEntry $simpleUrlEntry2 -ActiveUrl "
https://lync.hk.abc.com/meet"
 
 New-CsSimpleUrlConfiguration -Identity site:LYNC-HK -SimpleUrl @{Add=$simpleUrl1, $simpleUrl2}



 ---------------------------------------------------------------------------


 $simpleUrlEntry1 = New-CsSimpleUrlEntry -Url "
https://lync.us.abc.com/dialin"
 $simpleUrlEntry2 = New-CsSimpleUrlEntry -Url "
https://lync.us.abc.com/meet"
 
 $simpleURL1 = New-CsSimpleUrl -Component "dialin" -Domain "*" -SimpleUrlEntry $simpleUrlEntry1 -ActiveUrl "
https://lync.us.abc.com/dialin"
 $simpleURL2 = New-CsSimpleUrl -Component "meet" -Domain "abc.com" -SimpleUrlEntry $simpleUrlEntry2 -ActiveUrl "
https://lync.us.abc.com/meet"
 
 New-CsSimpleUrlConfiguration -Identity site:LYNC-US -SimpleUrl @{Add=$simpleUrl1, $simpleUrl2}



Lync 2010 - error publishing SQL Reporting HTTP 401 Unauthorised

Problem
When trying to publish Lync 2010 SQL reports to a Windows 2008 R2 / SQL 2008 R2 server.
you receive error "HTTP 401 Unauthorised"

Cause
This is because by Default SQL 2008 R2 / Windows 2008 R2 is set to auto negotiate the authentication method. The problem is, that it will try and use "kerberos" authentication which by design is far more secure, which in turns can cause restrains on certain actions .
Full Details

Resolution
Force SQL Reporting to use NTLM Authentication.

Use NTLM. NTLM will generally work in cases where Kerberos authentication fails. To use NTLM, remove RSWindowsNegotiate from the RSReportServer.config file and verify that only RSWindowsNTLM is specified. If you choose this approach, you can continue to use a domain user account for the Report Server service even if you do not define an SPN for it.