Having worked on a couple of Enterprise Voice deployments since the launch of Lync Server 2010 I have been missing a feature that I honestly thought would be incorporated by launch. It is the ability to find unused available numbers in a given number range assigned to the Lync Server based on Unassigned Numbers. I even hoped it would be possible to assign a teluri to users through a drop down list in the Silverlight GUI since the information is available in the server. I hope this will be available in a later Service Pack or Cumulative Update.
Since this is a feature I really want, I have tried to create a PowerShell Script to find out how many numbers are available in any given number range and what they are. First of all I want to declare that I am a PowerShell novice so my syntax may not be that optimized. The script works, though there’s a lot of variables and loops that I am sure could be done better. The script does the following:
- It goes through each entry in Unassigned Phone Numbers that needs to be populated with all numbers series available to the Lync Server
- See TechNet on how to do it: http://technet.microsoft.com/en-us/library/gg412748.aspx
- Also see TechNet on how to configure an Announcement required by Unassagnied Numbers: http://technet.microsoft.com/en-us/library/gg412783.aspx
- Then it gets all teluri’s for all the users, dial-in conferencing and Exchange UM contacts
- I didn’t find the response group command to get the teluri while I was at it, will add this in an update
- Then the string gets “washed” for “tel:+47” where 47 is the hardcoded region code for Norway
- The string also get “washed” for any extension numbers
- After that a new string gets created to get rid of property types and so on
- I use Compare-Object to compare the Unassigned Number array with the used numbers
- Run a check to find what numbers where not used and count them
- Then I find out what the total number of unused numbers are and write the output
I hope this script will come useful to anyone who needs this feature and that others can use this to and adapt it to their needs. Please share any improvements that could be made to the script. Enjoy!