Skip to content

Latest commit

 

History

History
142 lines (104 loc) · 2.57 KB

Add-PnPTeamsUser.md

File metadata and controls

142 lines (104 loc) · 2.57 KB
Module Name schema applicable online version external help file title
PnP.PowerShell
2.0.0
SharePoint Online
PnP.PowerShell.dll-Help.xml
Add-PnPTeamsUser

Add-PnPTeamsUser

SYNOPSIS

Required Permissions

  • Microsoft Graph API: Group.ReadWrite.All

Adds a user to an existing Microsoft Teams instance.

SYNTAX

User

Add-PnPTeamsUser -Team <TeamsTeamPipeBind> -Channel <TeamsChannelPipeBind> -User <String> -Role <String> 

Users

Add-PnPTeamsUser -Team <TeamsTeamPipeBind> -Users <String[]> -Role <String> 

DESCRIPTION

This cmdlet adds one or more users to an existing Team.

EXAMPLES

EXAMPLE 1

Add-PnPTeamsUser -Team MyTeam -User john@doe.com -Role Owner

Adds a user as an owner to the team.

EXAMPLE 2

Add-PnPTeamsUser -Team MyTeam -User john@doe.com -Role Member

Adds a user as a member to the team.

EXAMPLE 3

Add-PnPTeamsUser -Team MyTeam -Users "[email protected]","[email protected]" -Role Member

Adds multiple users as members to the team.

EXAMPLE 4

Add-PnPTeamsUser -Team MyTeam -User "[email protected]" -Role Member -Channel Private

Adds user as a member to a private channel named Private in MyTeam team.

PARAMETERS

-Role

Specify the role of the user

Type: String
Parameter Sets: (All)
Accepted values: Owner, Member

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Team

Specify the group id, mailNickname or display name of the team to use.

Type: TeamsTeamPipeBind
Parameter Sets: (All)

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Channel

Specify the channel id or name of the team to retrieve.

Type: TeamsChannelPipeBind
Parameter Sets: (User)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-User

Specify the UPN (e.g. [email protected])

Type: String
Parameter Sets: (User)

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Users

Specify the users UPN (e.g. [email protected], [email protected])

Type: String array
Parameter Sets: (Users)

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

RELATED LINKS

Microsoft 365 Patterns and Practices