A few examples from search-lineuri

It’s about time to give a few examples of our scripts, and I thought I’d start out with a few basics from the search-linerui script.

I have tried to create an accurate help description with in the script, so everything should be explained with the use of  “get-help .\search-lineuri.ps1 -Detailed” but here are a few pointers with screenshots as well.

One of the errors I see when other use the script is when the run it without any parameters. When the script was first created it did not require any parameters, but in order to do all the things I want to with it I had to make parameters mandatory. If you run the script without any valid parameters, you should receive the following custom error prompt:

search-ex1

Try run the script with at least one parameter like “-search” to get a result:

search-ex2

Please observe I have set a validation on the number parameter ($URIsearch) at least 2 digits and maximum 20 digits long ([ValidateLength(2,20)]). It will cause a system error if a search is tried with fewer or longer extensions:

search-ex3

That’s all for now. I will post more screen shots and usage examples in the following weeks

Advertisements

Search-LineURI v3_2 released

Just a quick note to let you know the previously reported issue with “-listasgridview” has been fixed.

An updated version is now available on the donwload link above.

Thank you for your feedback, and help on the subject guys.

Error in -ListAsGridView output from Search-LineURI.ps1

I was recently altered about an error in the Search-LineURI.ps1 script. (Thanks Alessio ;)

There seems to be an error when searching for an extension, and asking for the result in the ListAsGridView format. The error occurs when there is only one identity is found, and looks like this:

searchuri error

I have not been able to replicate the error when the search results in more than one result:

searchuri error2

I will try to fix this in an upcoming release, but have not found a good way to capture the error yet. If anyone know to handle this error, pleas let me know, and I’ll put your name in there.

Search-LineURI

Sometimes it can be hard to find where a number is configured in the system. Not all numbers are shown in the CSCP. And the only way find it is through poweshell commands.

You basically have to search for an identity’s lineuri with these commands: Get-CsUser, Get-CsAnalogDevice, Get-CsCommonAreaPhone, Get-CsExUmContact, Get-CsDialInConferencingAccessNumber, Get-CsTrustedApplicationEndpoint, Get-CsRgsWorkflow.

This script, does it all for you. Search for the number, and it will look through all the possibilities and show you where the number is located.

Search-LineURI is intended for Lync 2013, Windows server 2012 and PowerShell v3

Current version of the script is v2.2 (of December 2013). A new release is planned just before the upcoming Lync Conference in February, so stay tuned. To find the current release of the script, just follow the link to Search-LineURI in the menu.