Module Name | schema | applicable | online version | external help file | title |
---|---|---|---|---|---|
PnP.PowerShell |
2.0.0 |
SharePoint Online |
PnP.PowerShell.dll-Help.xml |
Add-PnPTeamsUser |
Required Permissions
- Microsoft Graph API: Group.ReadWrite.All
Adds a user to an existing Microsoft Teams instance.
Add-PnPTeamsUser -Team <TeamsTeamPipeBind> -Channel <TeamsChannelPipeBind> -User <String> -Role <String>
Add-PnPTeamsUser -Team <TeamsTeamPipeBind> -Users <String[]> -Role <String>
This cmdlet adds one or more users to an existing Team.
Add-PnPTeamsUser -Team MyTeam -User john@doe.com -Role Owner
Adds a user as an owner to the team.
Add-PnPTeamsUser -Team MyTeam -User john@doe.com -Role Member
Adds a user as a member to the team.
Add-PnPTeamsUser -Team MyTeam -Users "[email protected]","[email protected]" -Role Member
Adds multiple users as members to the team.
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.
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
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
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
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
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