Skip to main content

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 or teamName but not both.

--teamName [teamName]

The display name of the team to which the channel to remove belongs. Specify either teamId or teamName but not both.

-i, --id [id]

The ID of the channel to remove. Specify id or name but not both.

-n, --name [name]

The name of the channel to remove. Specify id or name but not both.

-f, --force

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 is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--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 --force

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" --force 

Response

The command won't return a response on success.

More information

CTRL + M