Collecting Client Logs for Lync 2013, Skype for Business 2015, & Skype for Business 2016

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".


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



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.


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.


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  This is the file that you will securely upload to your support engineer.


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.


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


Comments (4)

  1. Bhavin Balsara says:

    Thank you for the script, very helpful.

  2. Kevin Mack says:

    Im getting this error.
    Exception calling “ReadKey” with “1” argument(s): “The method or operation is not implemented.”
    At line:71 char:9
    + $Host.UI.RawUI.ReadKey(“NoEcho,IncludeKeyDown”) | Out-Null
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : NotImplementedException

    Get-Process : Cannot bind argument to parameter ‘Id’ because it is null.
    At line:72 char:41
    + $LyncProcess = Get-Process -PID $LyncPID -ErrorAction Silentl …
    + ~~~~~~~~
    + CategoryInfo : InvalidData: (:) [Get-Process], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.GetP

    1. Kris-MSFT says:

      Try just running “Get-Process” in powershell and look for the Lync process?

  3. Komeng13 says:

    Is it possible to edit the script a bit just to copy Lync-UccApi-0.UccApilog only?


Skip to main content