Detecting Skype Activity with PowerShell

I’m working on a project to get a number of drivers updated across an environment. One of the biggest problems is that if we update certain audio, video, or network drivers while the user is in a Skype call, the call will fail. Often in testing I found that reconnecting to the Skype call or presentation was difficult or impossible and they were left as a “ghost participant” in the meeting without actually being there. To avoid this problem, I started work on a short script to detect activity before the installation began.

Some notes about the script:

  • You’ll need the LyncSDK. Specifically, just the single DLL, and it doesn’t need to be installed on the target systems, it just needs to be there somewhere.
  • You’ll need to update the path in line #1 of the code to reference where you’re keeping the DLL.
  • If a user manually changes to “Away” while on a call, the activity ID will change to away and this script will not detect they are on a call.

I’d like to thank leedesmond’s blog which got me most of the way there, and also make reference to this MSDN page which lists the ActivityId’s.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.