Searching for that LineURI - Again

This is a script I have not used for a while, and when I needed it recently I discovered it would not run properly on a Lync 2013 server. I decided to rebuild the script to adapt to Powershell v3 and Lync 2013.

It is quite simple. use the script to search for a part of a complete LineURI and see where the pattern is in use. The longer the pattern you use in your search, the more exact is the result.

As an update, the script has been signed to be run on any system, and a more appropriate snippet with explanation has been added. And again, this has been added to the Technet Gallery.

The script has not been tested on large deployments, so feedback and bug reports are really appreciated.