Remove-TeamUser
Remove an owner or member from a team, and from the unified group which backs the team.
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: last owner cannot be removed from the team.
Syntax
Remove-TeamUser
-GroupId <String>
-User <String>
[-Role <String>]
[<CommonParameters>]
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
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Note: The last owner cannot be removed from the team.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-User
User's UPN (user principal name - e.g. johndoe@example.com)
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈