Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
# You need to have the Teams pwoershell module installed first. To do this run
# Install-Module -Name MicrosoftTeams -Scope CurrentUser
# in a powershell prompt
# The csv file must have a header and there must be a column called email
# This should have the email addesses of the people you wish to add.
# Students will be in the format
$ea=Read-Host "Please enter your own email address"
Get-Team -User $ea | Format-List -Property DisplayName, GroupId
$gid=Read-Host "Please enter the group ID of the teams site you wish to add the users too"
$usercsv = Read-Host "Please enter the CSV file you wish to use to add the userd (must be in the same directory as the script)"
Import-Csv -Path $usercsv | foreach { Add-TeamUser -Verbose -Debug -GroupId $gid -User $}