Remove-TeamUser
Remove an owner or member from a team, and from the unified group which backs the team.
Syntax
Default (Default)
Remove-TeamUser
-GroupId <String>
-User <String>
[-Role <String>]
[<CommonParameters>]
Description
Note: The command will return immediately, but the Teams application will not reflect the update immediately. The Teams application may need to be open for up to an hour before changes are reflected.
Note: The last owner cannot be removed from the team.
Examples
Example 1
Remove-TeamUser -GroupId 31f1ff6c-d48c-4f8a-b2e1-abca7fd399df -User dmx@example.com -Role Owner
In this example, the user "dmx" is removed the role Owner but stays as a team member.
Example 2
Remove-TeamUser -GroupId 31f1ff6c-d48c-4f8a-b2e1-abca7fd399df -User dmx@example.com
In this example, the user "dmx" is removed from the team.
Parameters
-GroupId
GroupId of the team
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Role
If cmdlet is called with -Role parameter as "Owner", the specified user is removed as an owner of the team but stays as a team member.
If cmdlet is called with -Role parameter as "Member", the specified user will be removed as an owner and member.
Note: The last owner cannot be removed from the team.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-User
User's UPN (user principal name - e.g. johndoe@example.com)
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.