SfB/Lync Script – Get All Assigned Numbers

This script queries Skype for Business or Lync for all assigned numbers and displays them in a formatted table with the option to export to CSV. During processing LineURI’s that contain ‘ext=’ are extracted out into a DDI/DID and extension column.

This script collects Skype for Business or Lync Server objects including:
LineURI, Private Line, Analouge Lines, Common Area Phones, RGS Workflows, Exchange UM Contacts, Trusted Applications, Conferencing Numbers, Meeting Rooms, Hybrid Application Endpoint (On-premises Resource Accounts).

DOWNLOAD HERE

Andrew Morpeth
Andrew Morpethhttps://ucgeek.co/author/amorpeth/
Andrew is a Modern Workplace Consultant specialising in Microsoft technologies based in Auckland, New Zealand; Andrew is a Director and Professional Services Manager at Lucidity Cloud Services and a Microsoft MVP.

Related Articles

2 COMMENTS

  1. Hi Andrew, great tool. Thanks.
    I wanted to add a field for “users office location”
    How do I add to the search parameters in your Get all assigned numbers script ?

    • Great to hear you like the script. The office location is an AD attribute and is not returned as part of Get-CsUser I don’t believe. I’ve done something similar before like this:
      foreach ($AssignedNumber in $AssignedNumbers)
      {
      $ADMatch = Get-ADObject -SearchBase $ADPath -LDAPFilter “(msrtcsip-primaryuseraddress=$($AssignedNumber.SipAddress))” -Properties name, company, department, msrtcsip-primaryuseraddress, serialnumber
      $myObject2 = New-Object System.Object
      $myObject2 | Add-Member -type NoteProperty -name “LineURI” -Value $AssignedNumber.LineURI
      $myObject2 | Add-Member -type NoteProperty -name “DDI” -Value $AssignedNumber.DDI
      $myObject2 | Add-Member -type NoteProperty -name “Ext” -Value $AssignedNumber.Ext
      $myObject2 | Add-Member -type NoteProperty -name “Type” -Value $AssignedNumber.Type
      $myObject2 | Add-Member -type NoteProperty -name “Name” -Value $AssignedNumber.Name
      $myObject2 | Add-Member -type NoteProperty -name “SipAddress” -Value $AssignedNumber.SipAddress
      $myObject2 | Add-Member -type NoteProperty -name “Company” -Value ([string]$ADMatch.company)
      $myObject2 | Add-Member -type NoteProperty -name “Department” -Value ([string]$ADMatch.department)
      $myObject2 | Add-Member -type NoteProperty -name “EmployeeId” -Value ([string]$ADMatch.serialnumber)

      $Array2 += $myObject2

      }

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Andrew Morpeth
Andrew Morpethhttps://ucgeek.co/author/amorpeth/
Andrew is a Modern Workplace Consultant specialising in Microsoft technologies based in Auckland, New Zealand; Andrew is a Director and Professional Services Manager at Lucidity Cloud Services and a Microsoft MVP.

Latest Articles