Delete a channel

Glenn Maxwell 11,136 Reputation points
2022-09-18T19:24:07.973+00:00

Hi All

i have a requirement from a user to delete a teams channel. lets say the channel name is test123123123123
When i use the below syntax. i see the output but i am unable to view the complete information i.e Display Name, MailNickName are bigger and i am not able to view full information.
for the channel test123123123123 i can see only test123.

Get-Team -User user1@Company portal .com.

  1. Please help me with the user PowerShell syntax to delete the channel.
  2. How can i know how many members are there in this channel.(will all users of unified group have access to the channel)
  3. when i use the syntax(Get-Team -User user1@Company portal .com). i can see group id. Is this group id the id of unified group. I can get the Team name from Azure ID.I want to know this channel is part of which Team before deleting it. please guide me
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,980 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,598 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,493 questions
0 comments No comments
{count} votes

Accepted answer
  1. JimmySalian-2011 42,171 Reputation points
    2022-09-18T21:52:34.487+00:00

    Hi,

    Sorry your question is vague, you want to delete a channel but you are checking Get-team -user command for what and reason?

    Simple way to delete the channel in teams is here - delete-a-channel-in-teams-973f9014-53db-4165-8ab4-365021fe36b7 However to delete a channel, you must be an owner of the team.

    ==
    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Yanli Jiang - MSFT 25,621 Reputation points Microsoft Vendor
    2022-09-20T07:06:12.62+00:00

    Hi @Glenn Maxwell ,
    Please refer to the steps to delete a team channel by using PowerShell:

    1.Open Windows PowerShell.

    2.Find the MicrosoftTeams PowerShell module. Run the below command:

    Find-Module MicrosoftTeams  
    

    (If you have installed MicrosoftTeams PowerShell module, please start with Step 5)

    3.Install MicrosoftTeams PowerShell module as an Administrator. Run the below command:

    Install-Module MicrosoftTeams    
    

    4.Verify the PowerShell module is installed. Run the below command:

    Get-Module MicrosoftTeams -ListAvailable  
    

    5.Connect Microsoft Team. Run the below command:

    Connect-MicrosoftTeams  
    

    6.Get the GroupId of your team. Run the below command:

    Get-team  
    

    7.Delete the team channel. Run the below command:

    Remove-TeamChannel -GroupId <group id>-DisplayName <Displayname>  
    

    Thanks,
    Yanli Jiang
    *
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.