Remove-TeamsUser can remove an owner or member from a team, and from the unified group which backs the team. The following is an example:
Remove-TeamUser -GroupId “GroupID” -User owner@example.com -Role Owner
About the role parameter, please note the following information:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.