Symptom: You receive the following error when trying to assign an Enterprise Voice number to a new user via powershell or the Lync Admin Web GUI (CSCP):
Filter failed to return unique result, "[SipAddress : sip:[email protected]] [LineURI : tel:+15555555555] [PrivateLine : tel:+15555555555] "
Solution: Execute the following commands below to see what the number is currently assigned to.
This command will check all users for the requested number.
Get-CsUser | where {$_.LineURI -eq "tel:+15555555555" -or $_.PrivateLine -eq "tel:+15555555555"} | Sort-Object LineURI | Select-Object Displayname, LineURI, PrivateLine
This command will check all common area phones for the requested number:
Get-CsCommonAreaPhone | where {$_.LineURI -eq "tel:+15555555555"} | Sort-Object LineURI | Select-Object Identity, LineURI, DisplayNumber, DisplayName, Description
This command will check all response groups for the requested number:
Get-CsRgsWorkflow | where {$_.LineURI -eq "tel:+15555555555"} | Sort-Object LineURI | Select-Object Name, Identity, LineURI, DisplayNumber, Description
This command will check all exchange contacts for unified messaging:
Get-CsExUmContact | where {$_.LineURI -eq "tel:+15555555555"} | Sort-Object LineURI | Select-Object identity, LineURI
Notes: I stumbled across these powershell commands from "The Regular IT Guy"; please check out his site here http://onlize.wordpress.com/2013/07/01/lync-add-user-error-filter-failed-to-return-unique-result/
Thanks, save me a fair bit of time and hair! 🙂
FYI, i had to use this in addition to the commands above to locate the number that was used:
Get-CsDialInConferencingAccessNumber | where {$_.LineURI -like "tel:+15555555555"}
Thank you for the tip!
-Jack
Thanks got the exact required result.