Search Results for

    Show / Hide Table of Contents

    Remove-PnPTeamsUser

    SYNOPSIS

    Required Permissions

    • Microsoft Graph API: Group.ReadWrite.All

    Removes a user from a team.

    SYNTAX

    Remove-PnPTeamsUser -Team <TeamsTeamPipeBind> -User <String> [-Role <String>] [-Force] 
     
    

    DESCRIPTION

    Allows to remove user from a team.

    EXAMPLES

    EXAMPLE 1

    Remove-PnPTeamsUser -Team MyTeam -User john@doe.com
    

    Removes the user specified from both owners and members of the team.

    EXAMPLE 2

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

    Removes the user john@doe.com from the owners of the team, but retains the user as a member.

    PARAMETERS

    -Force

    Specifying the Force parameter will skip the confirmation question.

    Type: SwitchParameter
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Role

    Specify the role of the user you are removing from the team. Accepts "Owner" and "Member" as possible values. If specified as "Member" then the specified user is removed from the Team completely even if they were the owner of the Team. If "Owner" is specified in the -Role parameter then the specified user is removed as an owner of the team but stays as a team member. Defaults to "Member". Note: The last owner cannot be removed from the team.

    Type: String
    Parameter Sets: (All)
    
    Required: False
    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
    

    -User

    Specify the UPN (e.g. john@doe.com)

    Type: String
    Parameter Sets: (All)
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    RELATED LINKS

    Microsoft 365 Patterns and Practices

    Back to top Generated by DocFX spacer