Commands › Microsoft Teams

Remove-TeamChannelUser

Microsoft Teams MicrosoftTeams Remove-*

Removes a user from a channel in Microsoft Teams.

Quick start script

# Remove-TeamChannelUser — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-TeamChannelUser
$before | Format-List

# 3. Make the change
Remove-TeamChannelUser -DisplayName <String> -GroupId <String> -User <String>

# 4. Verify and diff
$after = Get-TeamChannelUser
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Remove-TeamChannelUser -GroupId <String> -DisplayName <String> -User <String> [-Role <String>]
 [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-DisplayName String yes Display name of the private channel
-GroupId String yes GroupId of the team
-Role String Use this to demote a user from owner to member of the team
-User String yes User's email address (e.g. johndoe@example.com)

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.