SOLVED

Hard Delete a Teams Channel Message

%3CLINGO-SUB%20id%3D%22lingo-sub-1549812%22%20slang%3D%22en-US%22%3EHard%20Delete%20a%20Teams%20Channel%20Message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1549812%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20testing%20out%20trying%20to%20hard%20delete%20a%20Teams%20channel%20message%20that%20I%20have%20soft%20deleted.%20The%20Microsoft%20Team%20should%20have%20a%20hidden%20mailbox%20associated%20with%20it%20it%20shouldn't%20it%20were%20all%20the%20channel%20messages%20for%20this%20Team%20or%20stored%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESearch-Mailbox%20-Identity%20%22teamname%40domain.onmicrosoft.com%22%20-SearchQuery%20%22Subject%3ATestRetention%22%20-TargetFolder%20%22export%22%20-TargetMailbox%20%22name%40domain.com%22%20-LogLevel%20Full%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWARNING%3A%20WARNING%3A%20On%20July%201%2C%202020%2C%20the%20Search-Mailbox%20cmdlet%20is%20being%20retired%20and%20Microsoft%20Support%20will%20no%20longer%20provide%20assistance.%20See%20%3CA%20href%3D%22https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3Flinkid%3D2113221%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3Flinkid%3D2113221%3C%2FA%3E%20to%3CBR%20%2F%3Elearn%20more.%3CBR%20%2F%3EWARNING%3A%20The%20Search-Mailbox%20cmdlet%20returns%20up%20to%2010000%20results%20per%20mailbox%20if%20a%20search%20query%20is%20specified.%20To%20return%20more%20than%2010000%20results%2C%20use%20the%20New-MailboxSearch%20cmdlet%20or%20the%20In-Place%3CBR%20%2F%3EeDiscovery%20%26amp%3B%20Hold%20console%20in%20the%20Exchange%20Administration%20Center.%3CBR%20%2F%3EThe%20operation%20couldn't%20be%20performed%20because%20object%20'teamname%40domain.onmicrosoft.com'%20couldn't%20be%20found%20on%20'PROD.OUTLOOK.COM'.%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20InvalidArgument%3A%20(0%3AInt32)%20%5BSearch-Mailbox%5D%2C%20ManagementObjectNotFoundException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20%5BServer%3D445334543%2CRequestId%3D345534-13453457-345453-344-3434345%2CTimeStamp%3D28%2F07%2F2020%2010%3A24%3A39%5D%20%5BFailureCategory%3DCmdlet-ManagementObjectNotFoundException%5D%3CBR%20%2F%3E3445453%2CMicrosoft.Exchange.Management.Tasks.SearchMailbox%3CBR%20%2F%3E%2B%20PSComputerName%20%3A%20outlook.office365.com%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1549812%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E%22hard%20delete%20a%20channel%20message%22%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1550501%22%20slang%3D%22en-US%22%3ERe%3A%20Hard%20Delete%20a%20Teams%20Channel%20Message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1550501%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20cannot%20use%20Search-Mailbox%20against%20group%20mailboxes.%20Use%20eDiscovery%2FContent%20search%20instead%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fsearch-for-and-delete-messages-in-your-organization%3Fview%3Do365-worldwide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fsearch-for-and-delete-messages-in-your-organization%3Fview%3Do365-worldwide%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1552541%22%20slang%3D%22en-US%22%3ERe%3A%20Hard%20Delete%20a%20Teams%20Channel%20Message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1552541%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3Bok%20thanks.%20How%20do%20I%20hard%20the%20delete%20the%20message%20then%20if%20the%26nbsp%3B%3CSPAN%3ESearch-Mailbox%26nbsp%3Bdoes%20not%20allow%20searching%20against%20group%20mailboxes%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1553436%22%20slang%3D%22en-US%22%3ERe%3A%20Hard%20Delete%20a%20Teams%20Channel%20Message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1553436%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20article%20I%20linked%20to%20explains%20how...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1553444%22%20slang%3D%22en-US%22%3ERe%3A%20Hard%20Delete%20a%20Teams%20Channel%20Message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1553444%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%20Thanks%20I%20know%20%3A%20)%20I%20did%20delete%20the%20message%20after%20posting%2C%20so%20now%20too%20sure%20why%20it%20is%20still%20there%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional 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
Highlighted
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...

Highlighted

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

Highlighted

The article I linked to explains how...

Highlighted

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