Current version: v1.5 - 12th November 2019.


Complaints regarding a slow meeting join process in Lync aren’t at all uncommon, and in many cases are actually as a result of IIS’s automatic recycling process, itself intended to improve reliability of the IIS websites.

Drago Totev has published a fantastic process by which you can ensure your Lync IIS application pools are always sitting there idling away, ready for a user to join.

In his post, Drago walks you through how to create a scheduled task on your FE’s that waits for the Event that’s logged each time IIS recycles the Application Pools. When that trigger is seen, the scheduler fires a script that sends a dummy meeting join request through to IIS which then “warms them up” ready for a real user to join.

I recently followed his setup to add the Schedule to four Front-Ends, and decided by #2 that it would be great if you could just run a PowerShell script to do it all for you automatically. And now you can.

I’ve opted for one script to do everything, and in this case it serves dual purposes: it’s both the script you run to create the Scheduled Events, and it’s also the same script that the Scheduler fires to warm up the app pools. For bonus points it’s signed as well (thank you DigiCert), which will hopefully appeal to those who don’t like running unsigned scripts.

It’s pretty simple to use.

Creating the Scheduled Tasks

First off, realise that the script needs to be run from the folder you’re going to leave it in. The script captures its path in the process of creating the Scheduled task, and the Action it runs is going to look for it in that location – so make sure you don’t go moving or deleting it after you run the “create” step!

.\New-LyncMeetingWarmup.ps1 -CreateTasks -Verbose



Done.

The two Schedules look like this, with only minor differences in the Triggers and Actions to discern between a recycle of the Internal or External site

Query the Tasks

You can also run a query to see if or when the tasks have run:

.\New-LyncMeetingWarmup.ps1 –GetScheduledTaskInfo 

(The –verbose switch doesn’t reveal any extra info at this stage)

Here’s the triggering event in the Event Viewer:


 

Revision History


v1.5: 12th November 2019

 

v1.4: 3rd March 2018

 

v1.3: 10 February 2015

 

v1.2: 7 February 2015

v1.1: 17 January 2015

v1.0 : 16th January 2015:

 

Credits

Drago Totev for the original solution: http://www.lynclog.com/2013/12/user-might-experince-delay-when-join.html

Creating a task in PowerShell: http://www.verboon.info/2013/12/powershell-creating-scheduled-tasks-with-powershell-version-3/

Tricky Task creation: http://stackoverflow.com/questions/20108886/scheduled-task-with-daily-trigger-and-repetition-interval
https://p0w3rsh3ll.wordpress.com/2013/07/05/deprecated-features-of-the-task-scheduler/

 

- Greig.