Microsoft informed to deprecate all Teams PowerShell Modules (TPM) with a version older than/below 4.x.x. This means that only more recent PowerShell Modules newer than 4.x.x are going to work in the near future. After June 15th, 2022 TPMs older than 4.x.x will not work anymore.
As stated by the recent message center notification you need to prepare for this change. If you have scripts in place, to avoid that you scripts fail you should prepare before the date and start using the recent TPM version. Several cmdlets are new others are deprecated.
In regards of Teams telephony there new cmdlets and the old ones are not longer available in the recent TPM.
Example – Assign Teams Direct Routing Phone Number
Set-CsUser -Identity email@example.com -LineUri "tel:+49711987654321" -EnterpriseVoiceEnabled $true -HostedVoicemail $true
Set-CsPhoneNumberAssigment -Identity firstname.lastname@example.org -PhoneNumber "+49711987654321" -PhoneNumberType DirectRouting
There are just some small changes but you must obey and know them that it works. For instance, the phone number’s format is important. The prefix “tel:” is not required. I executed the cmdlet with the parameter and phone number incl. “tel:”. It did not fail and did not throw an error in my tests and the phone number was not assigned (even after waiting some time). Re-running the cmdlet without the prefix did the job as expected. So watch out and ensure your scripts work. The above is just one tiny example. For cmdlets’ details check the Teams cmdlet reference or use PowerShell get-help / get-command etc. after you’ve installed the latest TPM.
Quick Tip: Install Teams PowerShell Module
To install the recent stable TPM you can run the following as an admin (with elevated rights):
Install-Module MicrosoftTeams (-Scope AllUsers)
Quick Tip: Update previous Teams PowerShell Module
To update to the recent stable TPM you can run the following as an admin (with elevated rights):
Quick Tip: Uninstall previous Teams PowerShell Module
To uninstall an older TPM version you can run the following as an admin (with elevated rights) in a new PowerShell window and no active loaded TPM.
Uninstall-Module MicrosoftTeams -AllVersions