Alan's Blog

"Yeah. I wrote a script that will do that."

Menu
  • About My Blog
Menu

Skype and PowerShell – Toggle Mute, Export Participants

Posted on April 19, 2015September 15, 2018 by Alan

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.

Script Zip

Leave a Reply

You must be logged in to post a comment.

Search

Please Note

All the scripts are saved as .txt files. Newer files have a “View Script” button which will let you save or open a script in notepad. For earlier posts, the easiest way to download with IE is to right click on the link and use “Save Target As”. Rename file from Name_ext.txt to Name.ext.

To see a full post after searching, please click on the title.

PowerShell Scripts were written with version 3 or later.

https connections are supported.

All new users accounts must be approved, as are comments. Please be patient.  If you find a post error or a script which doesn’t work as expected, I appreciate being notified.  My email is my first name at the domain name, and you are welcome to contact me that way.

Tags

1E ACLS Active Directory ActiveDirectory ADSI Advanced Functions Audit Change Administrator Password COMObject Computer Groups DateTime Desktop DNS Excel FileScriptingObject Forms General GPO GPS Group Policy Hacks ISE Lockout logons NAV740 Nessus OU OU permissions Outlook Pick Folder Power PowerShell Powershell Scriptlets RDP SCCM schedule reboot Scripting Security Shell.Application user information VBA Windows Update WMI WordPress WPF

Categories

akaplan.com

  • Back to Home Page

Archives

Scripting Sites

  • A Big Pile of Small Things
  • Adam, the Automator
  • Art of the DBA
  • Ashley McGlone
  • Boe Prox
  • Carlo Mancini
  • DexterPOSH
  • Doug Finke
  • Jaap Brasser's Blog
  • JeffOps The Scripting Dutchman
  • Jonathan Medd's Blog
  • Keith Hill's Blog
  • LazyWinAdmin
  • Nana Lakshmanan
  • PowerShell Magazine
  • PowerShell Team Blog
  • PowerShell.org
  • PwrShell.net
  • Richard Siddaway's Blog
  • Ryan Yates' Blog
  • Skatterbrainz
  • The Lonely Administrator

SQL Site

  • Art of the DBA

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2025 Alan's Blog | Theme by SuperbThemes

Terms and Conditions - Privacy Policy