Remove organization wide team users using PowerShell

Frequent Contributor

Can PowerShell be used to remove a team user from Organization wide team e.g. Remove-TeamUser? Has anyone tried that? Does the change stick i.e. is the removed user re-added back by teams again?


I know recommended way to remove a user from Organisation wide team is to do it from the Teams client itself. But, our org-wide team has over 100 service accounts which we would like to remove via script.

3 Replies
Remove-TeamUser Should technically be the same thing. But I’ve Seen discrepancies. Go give one a whirl and see what happens :p.

@Chris WebbNope...Tried Remove-TeamUser and it doesn't stick. Teams just re-adds them back. It appears there is no way to do that via script and users must have to be removed using the Teams client for them to stay removed.

That's annoying. :p.