How to delete a private channel site?

Stefank 46 Reputation points
2022-03-16T22:40:23.243+00:00

Hi,

it looks like there is still the SharePoint site of a private channel hanging around. This was from a test long ago. And neither in Teams or Teams Admin console I can see this private channel. However, the SharePoint site is still there and points to the correct parent team.

How can I delete this site of the non-existing private channel?

Thanks!

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Teams | Microsoft Teams for business | Other
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,846 Reputation points Microsoft External Staff
    2022-03-17T08:00:58.827+00:00

    @Stefank

    By default, when you delete a private channel in the Microsoft Teams, it will delete both the channel and the site that is connected to it.

    You could go to SharePoint admin center -> Sites -> Active sites -> Find the site collection associated with the Teams -> Check whether this site collection has channel site.

    And you could use following PowerShell to delete a channel site.

    #Variables  
    $AdminSiteURL = "https://tenant-admin.sharepoint.com/"  
    $SiteCollURL = "https://tenant.sharepoint.com/sites/channelname"  
       
    #Connect to sharepoint online  
    Connect-SPOService -url "https://tenant-admin.sharepoint.com/" -credential (Get-Credential)  
       
    #sharepoint online powershell delete site collection  
    Remove-SPOSite -Identity $SiteCollURL -NoWait -Confirm:$false  
    

    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.

    5 people found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Stefank 46 Reputation points
    2022-03-21T13:35:52.553+00:00

    Hi @Emily Du-MSFT

    this worked to remove the private channel site.

    Cheers

    1 person found this answer helpful.
    0 comments No comments

  2. Ben 6 Reputation points
    2022-10-27T21:20:52.107+00:00

    The scripts works, however, you need to exclude the site from retention policies if applied.

    1 person found this answer helpful.
    0 comments No comments

  3. D. Freire 376 Reputation points
    2022-03-17T03:07:22.677+00:00

    Hello there,

    You should try deleting using PowerShell as described in https://learn.microsoft.com/en-us/sharepoint/delete-site-collection#permanently-delete-a-site .

    DF

    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.