question

AbhimanyuSharma-8660 avatar image
0 Votes"
AbhimanyuSharma-8660 asked JimmyYang-MSFT edited

Preciously we're using powershell command to find a name from Number

Get-CsOnlineUser | select SipAddress,HostedVoiceMail,EnterpriseVoiceEnabled,OnPremLineURI,OnlineVoiceRoutingPolicy | where {$_.OnPremLineURI -like “tel:‪xxxxxxxxxx”} previously this command is working fine.

But after upgrading the Teams version using Update-Module MicrosoftTeams command the above command stop working and even though not getting the error message after running the above command.

Please assist.

office-teams-windows-itprooffice-teams-app-dev
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Could you please provide any repro steps? and please share your MSTeams version

0 Votes 0 ·
AbhimanyuSharma-8660 avatar image
0 Votes"
AbhimanyuSharma-8660 answered JimmyYang-MSFT commented

![197007-image.png][1]



image.png (6.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AbhimanyuSharma-8660

Which version is your Teams PowerShell Module? 4.2.0?

Have you checked the @AlistairRoss-msft 's suggestion to see if you are using the correct parameter?

0 Votes 0 ·
AlistairRoss-msft avatar image
0 Votes"
AlistairRoss-msft answered AlistairRoss-msft edited

Hi @AbhimanyuSharma-8660, there were some significant changes in the MicrosoftTeams module with version 3.0, which is detailed below. Ensure your script is filtering on the correct parameter.


OnPremLineURI: This attribute previously used to refer to both:

  1. LineURI set via OnPrem AD.

  2. Direct Routing numbers assigned to users via Set-CsUser.

In Teams PowerShell Module version 3.0.0 and later, the OnPremLineURI attribute refers only to the LineURI that's set via OnPrem AD. Previously, OnPremLineURI also referred to Direct Routing numbers that were assigned to users via the Set-CsUser cmdlet. OnPremLineUriManuallySet is now deprecated as OnPremLineURI is representative of the On-Prem assignment. Also, Direct Routing numbers are available in the LineURI attribute. You can distinguish Direct Routing Numbers from Calling Plan Numbers by looking at the FeatureTypes attribute.

https://docs.microsoft.com/en-us/powershell/module/skype/get-csonlineuser?view=skype-ps

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AbhimanyuSharma-8660 avatar image
0 Votes"
AbhimanyuSharma-8660 answered

Hello Everyone,

Finally after doing some changes in the command. The command works fine.


Get-CsOnlineUser | select SipAddress,HostedVoiceMail,EnterpriseVoiceEnabled,LineURI,OnlineVoiceRoutingPolicy | where-object {$_.LineURI -like "tel:+xxxxxxxxxxxx"}

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JimmyYang-MSFT avatar image
0 Votes"
JimmyYang-MSFT answered JimmyYang-MSFT edited

Hi @AbhimanyuSharma-8660

Great to know that the issue has already been resolved by recreating your domain and thanks for the share!

By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.", and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:


[Preciously we're using powershell command to find a name from Number]

Issue Symptom:

 Get-CsOnlineUser | select SipAddress,HostedVoiceMail,EnterpriseVoiceEnabled,OnPremLineURI,OnlineVoiceRoutingPolicy | where {$_.OnPremLineURI -like “tel:‪xxxxxxxxxx”} previously this command is working fine.

But after upgrading the Teams version using Update-Module MicrosoftTeams command the above command stop working and even though not getting the error message after running the above command.

Resolution:
Run the following command and it works:

 Get-CsOnlineUser | select SipAddress,HostedVoiceMail,EnterpriseVoiceEnabled,LineURI,OnlineVoiceRoutingPolicy | where-object {$_.LineURI -like "tel:+xxxxxxxxxxxx"}


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.