Use a custom number range with Get-UnusedNumbers.ps1

A big ask for the script has been to use a custom number range. The script has been dependent on that Unassigned Numbers has been defined. I am happy to announce that you are now able to use a custom range with the Get-Unused function found within the script.

How to use a custom number range

Get-Unused -RangeStart +47232323001111 -RangeEnd +47232323001190 -Name “Custom Range Norway”

  • RangeStart needs the number to be in the e.164 format
  • RangeEnd needs to be within a reasonable range of RangeStart and in the e.164 format
  • Name is optional and you can call it what fits your deployment
  • Will return the next available number

unused1

Get-Unused -RangeStart +47232323001111 -RangeEnd +47232323001190 -Name “Custom Range Norway” -ListAll $true

  • RangeStart needs the number to be in the e.164 format
  • RangeEnd needs to be within a reasonable range of RangeStart and in the e.164 format
  • Name is optional and you can call it what fits your deployment
  • ListAll set to $true will list all available numbers

listunused2

Get the script at TechNet Gallery: http://gallery.technet.microsoft.com/Find-next-available-number-58391c72

Advertisements

3 thoughts on “Use a custom number range with Get-UnusedNumbers.ps1

  1. A quick question; on line 223 you return the second row in the array with the $ListUnUsed[1] command, rather than the first which would be $ListUnUsed[0] – is there a reason for this?

    I’ve found that when a range has only one number available, the script in its current form returns no available number, despite being aware that, for example, 1/10 in the range are free.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s