1

I am trying Get the Channels users, using the following PowerShell Comments

$ChannelUser=Get-TeamChannelUser -GroupId $GroupId -DisplayName $ChannelName

It throws an error: The term 'Get-TeamChannelUser' is not recognized as the name of a cmdlet, function, script file, or operable program.

I have installed the following teams package

Install-Module MicrosoftTeams
1

You did install it, but did you import it to your PS-session?

Check your current session using Get-Module

And if not loaded, simply: Import-Module MicrosoftTeams

Update

Seems like the cmdlt Get-TeamChannelUser is still in development and are only included in the public preview version.

Add-TeamChannelUser

However, you should be able to install the latest public preview version.

Install Teams PowerShell public preview

If you're using the Public Preview version of Teams PowerShell, we strongly recommend that you first uninstall Skype for Business Online Connector.

Installing the Teams PowerShell public preview module for all users on a system requires elevated privileges. Start the PowerShell session using Run as administrator in Windows or use the sudo command on macOS or Linux.

If you're using PowerShell 5.1, you must update the PowerShellGet module beforehand. After you update PowerShellGet, close and reopen an elevated PowerShell session to ensure that the latest PowerShellGet is loaded.

Install-Module PowerShellGet -Force -AllowClobber

To install Teams PowerShell public preview, run the PowerShell command below.

You can find the latest preview version at PowerShell Gallery or in PowerShell by running "Find-Module MicrosoftTeams -AllowPrerelease"

Install-Module MicrosoftTeams -AllowPrerelease -RequiredVersion "1.1.3-preview"

(1.1.5) is the latest preview version as for 2020-09-16).

2
  • I have tried to Get-Module commands. I am able to see that the module got loaded. Also I can see all the commands like Get-Teams etc.. except the Get-TeamChannelUser – Akshay Dattatray Nangare Sep 15 '20 at 13:55
  • Which version(s) do you have installed? – Christoffer Sep 15 '20 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.