Add-UsersToTeamsFromCSVFile

1.7

Script to add users to teams or to private team channels using a CSV file. Users are added using their email address.

Requires MicrosoftTeams 1.1.10-preview.

Install-Module -Name MicrosoftTeams -RequiredVersion 1.1.10-preview -AllowPrerelease

Run Connect-MicrosoftTeams to connect to the AzureCloud before running this script.

You can only add users if you are the o
Script to add users to teams or to private team channels using a CSV file. Users are added using their email address.

Requires MicrosoftTeams 1.1.10-preview.

Install-Module -Name MicrosoftTeams -RequiredVersion 1.1.10-preview -AllowPrerelease

Run Connect-MicrosoftTeams to connect to the AzureCloud before running this script.

You can only add users if you are the owner of the team.

To add users to a teams, the CSV file requires 2 columns, separated by a comma.
First line of CSV file is a header indicating the column names: email, team

To add users to private channels in a team, the CSV file requires 3 columns, separated by commas.
First line of CSV file is a header indicating the column names: email, team, privatechannel

An additional column in the CSV file 'role' is optional, default role of user added is Member.

The team column should indate the name of the team and the privatechannel should indicate
the name of the private channel. Note that when a user is not a member of the team it will
be added to the team first before it is added to the private channel.

Script reports start and end time as well as the number of users added to teams and channels.

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Add-UsersToTeamsFromCSVFile

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Package Details

Author(s)

  • Walter van Heuven

Tags

Microsoft Teams Private Channel Import CSV

Dependencies

This script has no dependencies.

Release Notes

28 April 2021: 1.7 Changed script so that it does not exit when email address is unknown
02 February 2021: 1.6 Fixed issue when adding newly added user to private channel
20 January 2021: 1.5 Bug fixes and changed requirements to MicrosoftTeams 1.1.10-preview
16 October 2020: 1.4
09 October 2020: 1.3
08 October 2020: 1.2
08 October 2020: 1.1
06 October 2020: 1.0 First release on PowerShell Gallery
27 August 2020: Development of this script started with a script written by Jan Derrfuss

FileList

Version History

Version Downloads Last updated
1.7 (current version) 641 4/28/2021
1.6 480 2/3/2021
1.5 480 1/20/2021
1.4 482 10/16/2020