Updated September 2018. Note that this code works with Lync 2010 and Skype for Business, and that some of the scripts have been updated.
I spend a lot of time in Skype (formerly Lync) conferences. There are two things about the Lync 2010 client which drove me nuts. The first is that there was no way to toggle your mute on and off without clicking on the microphone. (Not until Lync 2013 were you able toggle the mute button with Windows logo key+F4.) The second is that there is no easy way to export the list of participants without using OneNote.
Being a scripting guy, I decided to try to solve both of these issues. Some web searching led me to the Lync 2013 Software Developers Kit (SDK), which appears to have a method to mute and unmute. When I wrote this I was using Lync 2010, and so I downloaded the 2010 Lync SDK — which did not contain this method. I was undeterred. Why not try the 2013 SDK? Well, it won’t install on your computer unless you have Lync 2013 (aka “Skype for Business”) installed on your computer.
I am a stubborn and determined man. I watched the install steps using ProcMon, and found a setup file in a temp folder which I was able to launch. With the 2013 SDK finally installed, I began looking at the interfaces for first the mute script, and then the participant script. I was happy to see that the 2013 SDK works just fine with Lync 2010, and all versions which follow.
As far as I can tell no one else has been successful in scripting these two things with PowerShell. I wrote Toggle-LyncMute.ps1, which toggles the Lync Mute on and off. Get-LyncParticipants.ps1 sends the participant list to your clipboard, including the phone numbers of dial in callers. The updated (5/16/15) zip also includes Set-BRBAndLock.ps1, which sets your status to “Be Right Back” and locks your computer. The files are in LyncScripts.zip, which contains the necessary Microsoft SDK files from the Lync SDK and the scripts.
Extract the files in the “Files” folder to your computer so that the Lync-2013-SDK folder is found in the same location as the PowerShell PS1 files, example:
C:\MyUserName\My Documents\Scripts\
–>Get-LyncParticipants.ps1
–>Set-BRBAndLock.ps1
–>Toggle-LyncMute.ps1
–>Lync-2013-SDK
–>Microsoft.Lync.Model.dll
–>Microsoft.Lync.Model.xml
–>Microsoft.Lync.Utilities.dll
–>Microsoft.Office.UC.dll
You may, but are not required to keep the files in the “Scripts” folder, so long as you keep the SDK files in the same folder as the script.
Then run the “Make Lync Shortcuts.vbs” script by double-clicking on it. This will create shortcuts on your desktop to the PowerShell scripts. Technical note: The shortcuts run with the -bypass parameter to ensure they run even if your executionpolicy is otherwise restricted.
Important note: PowerShell uses the trusted locations from Internet Explorer. Some people have had problems running this when installing to a folder off the root of their local drive. If you install to a restricted directory, you will get an error: HRESULT: 0x80131515. I know that “..\My Documents\Scripts\” works.
As always, the scripts are commented. The SDK files are signed by Microsoft. You don’t have to understand PowerShell or vbScripts to make this work for you.
You may delete the “Make Lync Shortcuts.vbs” scripts after you are setup.