August 9, 2011

Tutorial: Test-CsAddressBookService (Lync Server 2010 PowerShell cmdlet)

Filed under: Skype for Business,Lync Server 2013/2010, PowerShell — Desmond Lee @ 11:51 pm

This is the first post on the extensive set of Test-Cs* PowerShell cmdlets that shipped with Lync Server 2010 Management Shell. Let us kick off the journey for this tutorial series with a look at Test-CsAddressBookService.

Regardless of how your DNS infrastructure is setup - identical FQDN, parent/child or split DNS configuration - it helps to understand the clear distinction and need to have internal and external URLs properly defined. This is essential for organizations that intend to enable remote Lync 2010 (client) network connectivity or access besides the classic internal or VPN scenarios.

Commonly referred to as the Address Book Service (ABS), the Address Book Download Web service runs on the Lync Front-End server role or Registrar pool. This is responsible, among other important things, to provide features such as GAL/contact card information from AD, distribution list/group expansion and phone number normalization into RFC 3966/ITU E.164 format. Using Test-CsAddressBookService, a query can be executed against the service itself or the associated Web Query service.

To test the Address Book Download Web service residing on a particular Registrar pool, use the -TargetFqdn switch:

$absInternal = (Test-CsAddressBookService -Targetfqdn
-UserCredential (Get-Credential) -UserSipAddress “”)

If you already know the exact Uniform Resource Identifier (URI), replace the switch with -TargetUri and specify it in the form to query the Address Book Web Query service (ABWQ) instead. Note that these two switches are mutually exclusive.

Success is marked by the return of the actual location of the Address Book files in the form of a URL. This is contained in the TargetUri property of the returned object and the result property will indicate Success (else Failure).

PS C:\Users\administrator> $absInternal
TargetUri  :
TargetFqdn :
Result     : Success
Latency    : 00:00:00
Error      :
Diagnosis  :

By appending the -external switch, you can use this trick to quickly identify the URL or target URI and verify that it conforms to that defined in Topology Builder for external access as well as on the reverse proxy (since there is no Get-CsAddressBookService but the Get-CsAddressBookConfiguration cmdlet)*.

PS C:\Users\administrator> $absExternal
TargetUri  :
TargetFqdn :
Result     : Failure
Latency    : 00:00:00
Error      : ERROR - No response received for Web-Ticket service.
Diagnosis  :

Be aware that in this case, the stem of the returned target URI should map to a number of “External” configuration items (CIs) in the Lync Configuration Information dialog box**:

- DG URL External
- URL External From Server

More Info

Incidentally, the Test-CsAddressBookService cmdlet is an ideal candidate to setup and execute “synthetic transaction” in Lync Server 2010. This can all be performed manually or automatically using pre-defined test accounts and credentials.

* with matching certificate Subject Name (SN) or Common Name (CN), and/or Subject Alternate Name (SAN)
** access via depressed Left Control key then right mouse click on the Lync icon on the Windows system tray

- New Address Book Features
- Lync 2010 Integration
- Office Communications Server R2 / Lync Server 2010 - Remote Connectivity Analyzer Test
- Lync Server 2010 Resource Kit Tool: ABSConfig (download)

Technorati tags: Microsoft Lync Server/Client, PowerShell

No Comments »

No comments yet.

RSS feed for comments on this post. | TrackBack URI

Leave a comment

You must be logged in to post a comment.

Theme Designed by: Malone Car Hire Ireland