I wanted to add a list of members to Microsoft Teams but couldn't do it easily like adding multiple emails in gmail.

I read in a link that I can use PowerShell commands but I get error results.


Update1: After getting the solution in the first answer, I was able to pass the first error. In the previous picture.

Now I want to proceed and run the rest of commands and I reached this command and can't get through it.


This is the error message on PowerShell:

issue 2

This is the link I got the idea from: Adding bulk users from a .csv file to a Microsoft Teams team


I tried the next commands you provided but here's a picture. I have problems running the commands.

enter image description here

It could be some admin privileges I don't have in my rig, even I tried before to set myself as the main admin of the rig.

But anyway I solved the issue from another perspective. I used some excel functions to lookup the numbers I want and solved the problem that I wanted to run these commands for which is to add members in bulk for Microsoft Teams.

  • What commands are you running? – harrymc Aug 31 '20 at 18:46
  • The first one didn't work, that is listed in the link. – R1S8K Aug 31 '20 at 18:59
  • So we need to guess which one? Can't you show an entire PowerShell session? – harrymc Aug 31 '20 at 19:07
  • OK, I'm trying another way that seem to be much easier, would you like me to post its picture in the main post or continue with PowerShell commands ? – R1S8K Aug 31 '20 at 19:26
  • OK, I added a picture in the main post. – R1S8K Aug 31 '20 at 19:29

Run PowerShell as admin and try this command:

Install-PackageProvider -Name NuGet -RequiredVersion -Force

If the above command fails, enter the command below and then try again the above command:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Once NuGet is installed, open a PowerShell window and run the following command to Install the Microsoft Teams Module:

Install-Module MicrosoftTeams  

Run the following command to add Teams module to the current session:

Import-Module MicrosoftTeams  

Run the following commands to connect to Microsoft Teams:

Connect-MicrosoftTeams -Credential $credentials  

Run the following command to get all the teams:

  • Yep, worked with the 2nd command and activated the first one. – R1S8K Aug 31 '20 at 20:12
  • I couldn't run this command Connect-MicrosoftTeams – R1S8K Aug 31 '20 at 20:17
  • I posted update 1 in the main post. – R1S8K Aug 31 '20 at 20:21
  • I added more info. – harrymc Sep 1 '20 at 6:35

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.