1
votes

So, I'm looking to do some powershell automation now that my company is clamoring for Microsoft Teams. I installed the module version 1.0.5 (currently the latest) and I'm seeing documentation on how to add users to team channels.
I get cmdlet not found errors when using those commandlets

Get-TeamChannelUser : The term 'get-teamchanneluser' is not recognized as the name of a cmdlet, function, script file...

Low and behold, get-command -module MicrosoftTeams returns no cmdlets with TeamChannelUser (Get, Remove or Set).

I've tried older versions of the module but I'm still seeing the same symptom. Is anyone else able to reproduce this? Any workarounds?

3
get-command -module MicrosoftTeams CommandType Name Version Source ----------- ---- ------- ------ Cmdlet Get-Team 1.0.5 MicrosoftTeams Cmdlet Get-TeamChannel 1.0.5 MicrosoftTeams Cmdlet Get-TeamHelp 1.0.5 MicrosoftTeams Cmdlet Get-TeamsApp 1.0.5 MicrosoftTeams Cmdlet Get-TeamUser 1.0.5 MicrosoftTeamsDave Harding
please, put the info in your Question ... not in the comments. when wrapped in code formatting it will actually be readable ... [grin]Lee_Dailey

3 Answers

1
votes

I haven't tested this specifically, but have you looked into the new (pre-release) Microsoft Graph PowerShell module? It includes a lot of "Teams" functions, but also of course more broad "Graph" capabilities, which is important (recall that Teams relies on SharePoint, Groups, etc.).

0
votes

I had to manually install a test version 1.0.21, but now when I run the Get-Command, I see the ChannelUser cmdlets. Thanks to Hilton Giesenow, I'm going to try his suggestion as well and will mark it as the answer if it works better and post an update.

0
votes

I struggled to get this working. I ended up installing 1.1.3.

This is what worked for me:

PS C:\WINDOWS\system32> Install-Module -Name MicrosoftTeams -RequiredVersion 1.1.3-preview -AllowPrerelease -force -AllowClobber
PS C:\WINDOWS\system32> Import-Module microsoftteams
PS C:\WINDOWS\system32> get-command -Module microsoftteams