]1
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.
4 answers
Sort by: Most helpful
-
-
Alistair Ross 7,371 Reputation points Microsoft Employee
2022-04-27T15:14:27.037+00:00 Hi @Abhimanyu Sharma , 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:
- LineURI set via OnPrem AD.
- 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://learn.microsoft.com/en-us/powershell/module/skype/get-csonlineuser?view=skype-ps
-
Abhimanyu Sharma 86 Reputation points
2022-04-29T13:16:35.73+00:00 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"}
-
JimmyYang-MSFT 54,406 Reputation points Microsoft Vendor
2022-05-04T08:18:54.63+00:00 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.