Remove-TeamChannelUser
Removes a user from a channel in Microsoft Teams.
Syntax
Default (Default)
Remove-TeamChannelUser
-GroupId <String>
-DisplayName <String>
-User <String>
[-Role <String>]
[<CommonParameters>]
Description
Note
This cmdlet is part of the Public Preview version of Teams PowerShell Module, for more information see Install Teams PowerShell public preview and also see Microsoft Teams PowerShell Release Notes.
The command will return immediately, but the Teams application will not reflect the update immediately, please refresh the members page to see the update.
To turn an existing Owner into a Member, specify role parameter as Owner.
Note
Last owner cannot be removed from the private channel.
Examples
Example 1
Remove-TeamChannelUser -GroupId 31f1ff6c-d48c-4f8a-b2e1-abca7fd399df -DisplayName "Engineering" -User dmx@example.com
Parameters
-DisplayName
Display name of the private channel
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-GroupId
GroupId of the team
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Role
Use this to demote a user from owner to member of the team
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-User
User's email address (e.g. johndoe@example.com)
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.