teams channel remove¶
Removes the specified channel in the Microsoft Teams team
Usage¶
m365 teams channel remove [options]
Options¶
--teamId [teamId]
- The ID of the team to which the channel to remove belongs. Specify either
teamId
orteamName
but not both. --teamName [teamName]
- The display name of the team to which the channel to remove belongs. Specify either
teamId
orteamName
but not both. -i, --id [id]
- The ID of the channel to remove. Specify
id
orname
but not both. -n, --name [name]
- The name of the channel to remove. Specify
id
orname
but not both. --confirm
- Don't prompt for confirmation.
-h, --help [help]
- Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isfull
. --query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text,csv,md
. Defaultjson
--verbose
- Runs command with verbose logging
--debug
- Runs command with debug logging
Remarks¶
When deleted, Microsoft Teams channels are moved to a recycle bin and can be restored within 30 days. After that time, they are permanently deleted.
Examples¶
Remove the specified Microsoft Teams channel by Id
m365 teams channel remove --id 19:f3dcbb1674574677abcae89cb626f1e6@thread.skype --teamId d66b8110-fcad-49e8-8159-0d488ddb7656
Remove the specified Microsoft Teams channel by Id without confirmation
m365 teams channel remove --id 19:f3dcbb1674574677abcae89cb626f1e6@thread.skype --teamId d66b8110-fcad-49e8-8159-0d488ddb7656 --confirm
Remove the specified Microsoft Teams channel by Name
m365 teams channel remove --name 'name' --teamName "Team Name"
Remove the specified Microsoft Teams channel by Name without confirmation
m365 teams channel remove --name 'name' --teamName "Team Name" --confirm
Response¶
The command won't return a response on success.
More information¶
- directory resource type (deleted items): https://docs.microsoft.com/en-us/graph/api/resources/directory?view=graph-rest-1.0