Microsoft Teams features some commands (cmdlets) that are not readily available in the public/general release version of the Microsoft Teams powershell module. Some of these commands are;
get-teamchanneluser
add-teamchanneluser
If you attempt to run these commands, you'll get an error message like the one below;
get-teamchanneluser : The term 'get-teamchanneluser' 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
To fix the problem you will need to install the preview release of the Microsoft Teams powershell module. You can check the release version numbers from the website below
https://www.powershellgallery.com/packages/MicrosoftTeams/2.0.0
To install the preview release version, make note of the version number then run the command below
Install-Module -Name MicrosoftTeams -AllowPrerelease
To fix the problem you need to force an update of a couple of Powershell modules - namely PowershellGet and PackageManagement.
Install-Module : A parameter cannot be found that matches parameter name 'AllowPrerelease'.
At line:1 char:37
Run the commands below from an elevanted powershell command prompt;
Install-Module -Name PowerShellGet -Repository PSGallery -Force
Install-Module -Name PackageManagement -Repository PSGallery -Force
You can confirm what version is installed by running the commands
import-module "MicrosoftTeams"
get-module
Look for the version number for the "MicrosoftTeams" module
No comments:
Post a Comment