This happened to one of my customers
After using
Import-Module -Name MicrosfTeams
and connecting to teams using Connect-MicrosoftTeams
I tried to use Set-CSUser to assign the LineURI and other information
But, we were getting
Get-CsUser : The term ‘Get-CsUser’ is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is
correct and try again. At line:1 char:1
It seemed that we were using an old version of MicrosoftTeams module
In fact, many of the PowerShell commands that are used to manage Teams Direct Routing might fail if you are using the old version of MicrosoftTeams module
I asked my customer to close all of the opened PowerShell windows and open a new one and run the following command to uninstall the old module.
Uninstall-Module -Name MicrosoftTeams -Force
After that, we run:
Install-Module MicrosoftTeams -AllowClobber
And also connected to teams using
Connect-MicrosoftTeams
After that, Set-CSUser worked fine
Remember, many of the PowerShell commands that are used to manage Teams Direct Routing might fail if you are using the old version of MicrosoftTeams module
