Collecting Client Logs for Lync 2013, Skype for Business 2015, & Skype for Business 2016
Published May 20 2019 05:18 PM 3,116 Views
Brass Contributor
First published on TECHNET on Jan 11, 2017
Many times in my support role here at Microsoft, I write out the steps for customers to collect Lync or Skype Client logs.  I thought that writing a script might make it easier.  Here is a sample script that I like to use.



To download the sample script, visit the TechNet Gallery and save it to your desktop or some other familiar location

Once you have downloaded the script, right click on the script and select "Run with PowerShell".
collect-csclientlogs_rightclickrun

NOTE : You may get a prompt similar to this in PowerShell.  If you still wish to run the script, type 'Y' and hit enter:
collect-csclientlogs_executionpolicywarning




The first thing the script does is warn you that this data will have personally identifiable information or PII and that you should only transfer over a secure manner.  Email is not a secure way of transferring data 100% of the time.  This is because not all email servers communicate with TLS or SSL.  All it takes is one SMTP relay server in the route to strip the encryption off and now someone can read your data.  This is why I show the warning and verify that you understand.
collect-csclientlogs_scriptwarning

Next, the script checks which version is installed on the client computer so that it can identify the location of the Tracing folder.  Since Lync and Skype are bundled with Microsoft Office, this location will change with the different versions.

Office 2013 Lync Tracing Folder: %userprofile%\AppData\Local\Microsoft\Office\ 15.0 \Lync\Tracing
Office 2016 Skype Tracing Folder: %userprofile%\AppData\Local\Microsoft\Office\ 16.0 \Lync\Tracing

Then it checks to see if the client is still running.  I do this because if the client is running, some of the tracing files will be locked and will not get collected.  You cannot proceed until the client is closed.
collect-csclientlogs_lyncrunningwarning

Once the client is closed, hit any key to continue.  It will check to see if the Lync.exe process is still running and warn you again if it is.

Now the Tracing folder is Zipped an placed on the desktop with a file named Tracing_MM-DD-YYYY_HH.MM.SS.zip.  This is the file that you will securely upload to your support engineer.
collect-csclientlogs_zipfile

Next you will be prompted on whether or not you want to re-open the client.  Press Y if you do, any other key will simply stop the script.
collect-csclientlogs_final

And that is it.  I hope this saves you time when collecting logs for analysis.


Version history
Last update:
‎May 20 2019 05:18 PM
Updated by: