CmdID / PowerShell / Cmdlets / Remove
Remove-TeamUser
Remove an owner or member from a team, and from the unified group which backs the team. Microsoft Teams PowerShell reference
From the Microsoft Teams PowerShell reference 3 parameters Its page in the reference
Parameters
-GroupIdGroupId of the team-RoleIf 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.-UserUser's UPN (user principal name - e.g.