Forum Discussion

DarrenB852's avatar
DarrenB852
Copper Contributor
Jan 12, 2023

Clearing all posts in a teams channel

Hi there, 

I am hoping someone can advise: we need to clear all of the posts in a teams channel to effectively start fresh. Is this possible some how as a team owner? If not, any other solutions that anyone would suggest? 

 

Thanks!

  • As an owner of the Team, you can delete any post within (regular) channels. There is no quick "delete all" solution though, you'll have to do it one at a time. Perhaps it's best if you just delete the channel and recreate it?
    • SwissMaWi's avatar
      SwissMaWi
      Copper Contributor

      TonyRedmond 

      It would probably work... but why you need rocket science to perform such a simple task?

      • TonyRedmond's avatar
        TonyRedmond
        MVP
        The code works... and it's just PowerShell with some Graph API calls. It's not rocket science either.

        As to why this code is needed, the ethos of Teams from day zero has been to deliver persistent messaging. That's probably why Microsoft doesn't deliver a method to mass-delete posts. But when PowerShell is available, you can automate tasks to meet your own needs.
  • As an owner of the Team, you can delete any post within (regular) channels. There is no quick "delete all" solution though, you'll have to do it one at a time. Perhaps it's best if you just delete the channel and recreate it?
    • Ellie2506's avatar
      Ellie2506
      Copper Contributor
      It's the general channel in my case and you can't delete it and recreate.  This chat is full of out of date covid work from home comments from an ex-colleague, and it needs removing, but I haven't got all day to take it out one comment at a time.  Please find a solution to this. 
    • SwissMaWi's avatar
      SwissMaWi
      Copper Contributor

      VasilMichev 

      Hi. Why do I have to play computer and delete messages one at a time? I mean it is clear to everybody that this is a basic function that is needed, to delete all messages in a channel. What are the absolute basics not implemented?

      While at the same time in the new Teams a complete bullshit is implemented: now the messages are all in the wrong order?

  • YorkshireLad's avatar
    YorkshireLad
    Copper Contributor

    DarrenB852 

     

    I'd also like to see a 'delete all' function for old posts without having to go through the ritual of deleting posts and comments one by one. 

Resources