SOLVED

Microsoft Teams PowerShell Module V2.3 - Set-CsUser broken!

Copper Contributor

As Microsoft discontinued SkypeOnlineConnector (finally) we moved to MicrosoftTeams PowerShell Module for user management - especially for Direct Routing phone number management (-OnPremLineURI).

 

However, the current version of MicrosoftTeams PowerShell Module no longer supports -OnPremLineURI neither does it work for -EnterpriseVoiceEnabled:$true and or -HostedVoiceMail:$true 

 

We are currently inable to deploy new phone system users as the "legacy" SkypeOnlineConnector no longer functions.

24 Replies
I have the same problem, have you found a way to deploy new phone anyway?
Obviously not. GraphAPI is work in progress, SkypeOnlineConnector dosn't work either....
Microsoft just broke Teams Direct Routing - probably world wide.

Please Microsoft just re-enable SkypeOnlineConnector - we need to deploy new users to direct routing.
That's crap. So we wait for Microsoft to fix it.
I opened a ticket on Microsoft 365, I'm waiting for the return.

thank you for your information
best response confirmed by Markus_Hupfauer (Copper Contributor)
Solution

@Markus_Hupfauer 

 

We had the same issue today and this is how we got round it:

 

  1. Run a PS session as Admin
  2. Uninstall-Module -Name MicrosoftTeams
  3. Install-Module -Name MicrosoftTeams -RequiredVersion 2.0.0
  4. Import-Module -Name MicrosfTeams

This then allowed us to progress and use the Set-CsUser command.

Hi @Paul_Wood,

 

When we tried to go back to 2.0.0 - we are getting the following error message - 

 

 Exception calling "GetSteppablePipeline" with "1" argument(s): "Exception calling "GetRemoteNewCsOnlineSession" with "1" argument(s): "Run either Connect-MicrosoftTeams 

or new-csonlinesession before running cmdlets.""

At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\2.0.0\net472\SfBORemotePowershellModule.psm1:9474 char:13

+             $steppablePipeline = $scriptCmd.GetSteppablePipeline($myI ...

+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException

    + FullyQualifiedErrorId : CmdletInvocationException

 

Can you provide any insights into what might be causing this?  We are trying to do a 'connect-microsoftteams' with AADAccessToken and AccountID params.

 

Thanks,

--Venkata

Thanks for the solution.
I confirm the command St-CsUser works again with version 2.0.0 of the MicrosoftTeams module.
did that and on uninstall I get this error
Uninstall-Module -Name MicrosoftTeams
PackageManagement\Uninstall-Package : Access to the cloud file is denied
The file it selves are: At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:12733 char:21
Thanks @Paul_Wood I can confirm that downgrading to v2.0.0 of the MicrosoftTeams PowerShell module is a workaround and allows running of Set-CsUser -Identity xxx -OnPremLineURI which is needed for customers using Direct Routing.

The Skype Online Connector stopping working today was a surprise to us as our message center post says 15 May 2021 so it should still be working in my opinion.

I have logged with MS Support and urge others to do the same.
Message Center clearly states 15 May 2021 for us too!
Thanks a lot @Paul_Wood!
I'm sure you already figured out that you will need to run Connect-MicrosoftTeams after importing the 2.0.0 module

Yes, we were trying to use the Connect-MicrosoftTeams -AadAccessToken $token -AccountId <upn>.  The teams commands are working fine.  The SFBO commands are failing.

 

 

And there are more issues https://office365itpros.com/2021/05/04/teams-updated-powershell-module/
but the set-csusers is under investigation #didMicrosoftKillDirectRouting :)
MS Support just yesterday got back to us and was unable to understand that the PowerShell Module was broken. They wanted to remote type the command and perform a step recording. At that point we closed the request as this was going nowhere.

Someone botched this transition / upgrade massively.
This is a serious problem for any one deploying new customers to Teams with Enterprise Voice.
The previous versions 2.0.0 and forward have some serious performance degradations.
I don't get how a refactoring of a well used connector can end up with such a serious degradation!
Does any one know if version 1.1.6 of the Teams module will continue to work after the retirement of Skype for Business Online connector ?
Same here: the 2.x versions are really slow and we decided to keep using 1.1.6, but we could not find any information if 1.1.6 will stop working after 5/15/2021 as the SfB module.

@Markus_Hupfauer 

big issue.

check my post -

https://www.linkedin.com/pulse/microsoft-releases-v230-teams-powershell-module-elazar-ohayon/ 

So we wait for Microsoft to fix it.

Hopefully, this will happen quickly.

Yes it does :) but apparently some arguments are still broken, but it's at least better than the previous release.

Oh dear. Any ideas which ones?

This seemed to execute ok, without any errors:

Set-CsUser -Identity user@doamin.com -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI "tel:+1234567890"

Note they've gone back to using -Identity ! 

1 best response

Accepted Solutions
best response confirmed by Markus_Hupfauer (Copper Contributor)
Solution

@Markus_Hupfauer 

 

We had the same issue today and this is how we got round it:

 

  1. Run a PS session as Admin
  2. Uninstall-Module -Name MicrosoftTeams
  3. Install-Module -Name MicrosoftTeams -RequiredVersion 2.0.0
  4. Import-Module -Name MicrosfTeams

This then allowed us to progress and use the Set-CsUser command.

View solution in original post