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.
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 Tracing_MM-DD-YYYY_HH.MM.SS.zip. 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.