SOLVED

Hard Delete a Teams Channel Message

Iron Contributor

Hi,

 

I am testing out trying to hard delete a Teams channel message that I have soft deleted. The Microsoft Team should have a hidden mailbox associated with it it shouldn't it were all the channel messages for this Team or stored?

 

Search-Mailbox -Identity "teamname@domain.onmicrosoft.com" -SearchQuery "Subject:TestRetention" -TargetFolder "export" -TargetMailbox "name@domain.com" -LogLevel Full

 

WARNING: WARNING: On July 1, 2020, the Search-Mailbox cmdlet is being retired and Microsoft Support will no longer provide assistance. See https://go.microsoft.com/fwlink/?linkid=2113221 to
learn more.
WARNING: The Search-Mailbox cmdlet returns up to 10000 results per mailbox if a search query is specified. To return more than 10000 results, use the New-MailboxSearch cmdlet or the In-Place
eDiscovery & Hold console in the Exchange Administration Center.
The operation couldn't be performed because object 'teamname@domain.onmicrosoft.com' couldn't be found on 'PROD.OUTLOOK.COM'.
+ CategoryInfo : InvalidArgument: (0:Int32) [Search-Mailbox], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : [Server=445334543,RequestId=345534-13453457-345453-344-3434345,TimeStamp=28/07/2020 10:24:39] [FailureCategory=Cmdlet-ManagementObjectNotFoundException]
3445453,Microsoft.Exchange.Management.Tasks.SearchMailbox
+ PSComputerName : outlook.office365.com

4 Replies
best response confirmed by ThereseSolimeno (Microsoft)
Solution

You cannot use Search-Mailbox against group mailboxes. Use eDiscovery/Content search instead: https://docs.microsoft.com/en-us/microsoft-365/compliance/search-for-and-delete-messages-in-your-org...

@Vasil Michev ok thanks. How do I hard the delete the message then if the Search-Mailbox does not allow searching against group mailboxes?

The article I linked to explains how...

@Vasil Michev  Thanks I know : ) I did delete the message after posting, so now too sure why it is still there

1 best response

Accepted Solutions
best response confirmed by ThereseSolimeno (Microsoft)
Solution

You cannot use Search-Mailbox against group mailboxes. Use eDiscovery/Content search instead: https://docs.microsoft.com/en-us/microsoft-365/compliance/search-for-and-delete-messages-in-your-org...

View solution in original post