RSS Subscription 168 Posts and 2,769 Comments

Archive for October, 2012

Lync MX Client – Viewing Logs

The Lync MX Client is a new client that was released in late October 2012.  Maybe people will refer to this client as the Lync MX client.  In fact, when viewing log files, you will see the log files refer to MX.  The interesting part about this client is it appears to be a hybrid between a full Lync client and the Lync client you will find on your other mobile devices such as IOS (both Iphone and IPad), Android, and Windows Phone 7.  The biggest difference with the Lync RT client, is that it supports voice and video which allows you to use this client as a full blown client.  It also allows my to expand Exchange Distribution Lists I have on my contact list, visual voicemail, conversation history, etc..  It is a richer client.  That is for sure.

When first installing the Lync RT app from the Microsoft Store, logging will be turned off.  However, the directory that will house the log files will be created similar to the full Lync 2010 and Lync 2013 client.

For the remainder of the article, I will use the following terminology:

  • Lync MX (instead of Lync RT, Lync Metro, Lync Store App, etc…)
  • Lync Desktop Client (instead of Lync 2010 or Lync 2013)
  • Lync Mobile Client (used when referring to the IOS, WP7, or Android client)

So far, it seems like Lync MX is structured more like the full Lync desktop client.

From below, we can see the location of the tracing log files would be: C:\Users\Username\AppData\Local\Packages\Microsoft.LyncMX_8wekyb3d8bbwe\LocalState\Tracing.  That Microsoft.LyncMX_8wekyb3d8bbwe directory may seem like a dynamic name, but it is not.  It’s static and will be the same path no matter what installation you are looking at.

So far, we have no UCCAPI Logs which are the tracing logs we would use in Snooper to see what the client is doing.  We also see no ETL logs which are the log files that provide more information that you would care to see (in 99.9% of cases).  After logging into Lync MX, I still have no UCAAPI log files.  What I realize is, that for the Lync MX Client, the log file we are looking for no longer does not end in the extension of UCCAPI as we’re used to with the Lync Desktop Client.  The log file we’re looking for is actually Lynclog and does open in Snooper.  But even though this log file exists, no data will be written to it just yet.  We still need to configure a setting first.

Once in Options, scroll to the very bottom and turn on Diagnostic Logs.

Once this is On, I’ll log off and log back on to the Lync MX client.  After doing so, I see some new ETL data and a WPPMedia folder.  But, still no UCAPPI Log that we would use in Snooper to view client-side traces.  What I realized is, with Diagnostic Logging turned on, I now also see some data in the Lynclog file.

So I tried opening the Lynclog file in Snooper and low and behold, it appears that LyncLog is the replacement for UCCAPI… at least for the Lync MX client.

If you have experience with the mobile client, you will know that once you turn on Diagnostic Logging, there is some action you must perform to save the log files.  For example, in the WP7 client, you choose to save the log file and it creates a JPG that you can attach to an e-mail, rename to log on a PC, and view the log information.

So going back into the Lync MX Settings (Windows + I), go to About, scroll to the bottom and choose Save logs.


From digging around, it appears that the Save logs option doesn’t actually do anything.  I’ll keep looking around to see if it actually does anything.  If you discover it does anything, be sure to let me know and I’ll update the article accordingly.

Share

DBIMPEXP.exe functionality integrated into Lync 2013 Preview Management Shell

Prior to Lync Server 2013, there was a tool.  And this tool was called DBIMPEXP.exe.  It stands for Database Import Export.  This tool was part of the OCS and Lync 2010 Resource Kits, but will now be deprecated to make way for built-in Lync Management Shell PowerShell commands.  But before we talk about its replacement in detail, let’s talk a little bit about DBIMPEXE.exe’s capabilities. DBIMPEXP.exe was used to back up users contact and conference data.  In fact, part of the official backup instructions were to use the DBIMPEXP.exe to backup user data.

Lync Server 2010 – DBIMPEXP.EXE

Note: I am documenting the commands below for Enterprise Edition of Lync.  For Standard Edition, simply remove /sqlserver.

Backing up and restoring all user data

From the official, “Backing Up Core Data and Settings” Technet article, Microsoft provides the following DBIMPEXP.exe commands to back up user data:

Dbimpexp.exe /hrxmlfile:<path and backup file name> /sqlserver:<SQL Server FQDN>\<instance name>

An example would be:

Dbimpexp.exe /hrxmlfile:D:\BackupUser.xml /sqlserver:sql.contoso.com\rtc

To import data from your backed up .xml file, the following command would import user data:

Dbimpexp.exe /hrxmlfile:<path and file name of backed up Rtc database> /sqlserver:<SQL Server FQDN>\<instance name> /import /restype:all

An example would be:

Dbimpexp.exe /hrxmlfile:D\BackupUsers.xml /sqlserver:sql.contoso.com\rtc /import /restype:all

 Backing up and restoring specific user’s data

There is more control over the usage of Dbimpexp.exe.  With the above commands, you are essentially backing up and restoring the entire rtc database for all user contact and conference information.  If we wanted to backup a specific  user’s contact/conference information, we can run the following command:

dbimpexp.exe /hrxmlfile:contacts.xml /user:<sip URL> /sqlserver:sqlservername

To import that specific user’s data from their backed up .xml file, the following command would import that user’s data.

dbimpexp.exe /import /hrxmlfile:contacts.xml /user:<sip URL> /sqlserver:SQL_SERVER

Backing up specific data resource types

With the aforementioned commands, all have a /restype set to all.  This means both contact list and conference directory information is exported.  There is a way to backup either the user or conference data without exporting both.  To export only the user contact list data, the following restype would be specified:

/restype:user

To export only the conference data, the following restype would be specified

/restype:confdir

When using /restype:confdir, you can also specific a specific conference directory by using the /dirid switch as follows:

/dirid:1001

 

 Lync Server 2013 Preview – *-CSUserData

Lync Server 2013 Preview has deprecated the use of DBIMPEXP.exe.  There are now native Lync Mangement Server cmdlets to provide the equivalent.  These three commands are:

  • Export-CSUserData – Exports User Data to a ZIP File
  • Import-CSUserData – Imports User Data from a ZIP File.  This does require a restart of the Front End Service (RTCSRV) to allow the data from the SQL blob store to the RTC Database.  This is a fast process to import data and is geared more towards bulk import operations.
  • Update-CSUserData – Updates User data from a ZIP File  This does NOT require a reboot of the Front End Service (RTCSRV)  but is an expensive and slow process and therefore, should only be run in one-off user scenarios rather than bulk import operations.
  • Convert-CSUserData – Converts between a 2010 XML file provided from DBIMPEXP.exe and a ZIP file provided from Export-CSUserData

Note: For this article, I will be showing the new Export-CSUserData and Import-CSUserData commands.  In a future article for Lync Server 2013 RTM, I will provide more information on the remaining commands.

Export-CSUserData

This is the direct replacement for dbimpexp.exe /export.

The command I will be running against my test Lync Server 2013 Preview Pool is as follows:

Export-CsUserData -PoolFQDN “lync15pool.15lab.net” -FileName “C:\Logs\ExportedUserData.zip”

After exporting the data, we see that we now have a ZIP file.

And within that ZIP, we get a couple XMLfiles.  The meat of the data is stored in DocItemSet.xml.

Just as with DBIMPEXP.exe, we can filter on specific users and conference directories for export.

To filter for a specific user, we would run the following command:

Export-CsUserData -PoolFQDN “Pool FQDN” -UserFilter “user@domain.com” -FileName “<path and backup file name>”

To filter for a specific Conference Directory, we would run the following command:

Export-CsUserData -PoolFQDN “Pool FQDN” -ConfDirectoryFilter 13 -FileName “<path and backup file name>”

Import-CSUserData

This is the direct replacement for dbimpexp.exe /import.  It imports data from the ZIP file previously exported from Export-CSUserData.  Then the user data will be replicated with Active Directory automatically at regular time via Lync user replicator service

I will be importing the data I ran previously from Export-CSUserData. The command I will be running against my test Lync Server 2013 Preview Pool is as follows:

Import-CsUserData -PoolFQDN “lync15pool.15lab.net” -FileName “C:\Logs\ExportedUserData.zip”

After importing the data, we see need to restart the Front End Service, RTCSRV, on all Front End Servers in the pool so that the restored data will propagate from the SQL blob store.

This can easily be achieved by running the following commands:

Stop-CSWindowsService -Name RTCSRV

After all Lync Server 2013 Preview services have been stopped, the following command will start all the Lync Server 2013 Preview services.

Start-CSWindowsService

Just as with DBIMPEXP.exe, we can filter on specific users and conference directories to import.

To filter for a specific user, we would run the following command:

Import-CsUserData -PoolFQDN “Pool FQDN” -UserFilter “user@domain.com” -FileName “<path and backup file name>”

To filter for a specific Conference Directory, we would run the following command:

Import-CsUserData -PoolFQDN “Pool FQDN” -ConfDirectoryFilter 13 -FileName “<path and backup file name>”
Share