question

AaseNomad avatar image
0 Votes"
AaseNomad asked Sayali-MSFT-0291 commented

How to put Teams Channel on litigation Hold using PowerShell

I've been trying to put Teams channel to eDiscovery Hold(both mailbox and sharepoint) using PowerShell but I'm stuck so I would be really appreciated if I can get any help or suggestion on how to proceed with my script.

Basically the idea is, I will provide the either Private or Public Team Channel name at the begining of the script and it'll put everything on eDiscovery hold.

$UserEmail = "username@nam.com" 

Connect-MicrosoftTeams 
Get-Team -user $UserEmail  


$Mailbox = Get-Mailbox | Where {$_.PrimarySmtpAddress -eq $UserEmail} 

Get-UnifiedGroup | Where {(Get-UnifiedGroupLinks $_.Alias -LinkType Members).DistinguishedName -contains $mailbox.DistinguishedName} 


Get-UnifiedGroup | select DisplayName, SharePointSiteUrl 

Get-MailboxFolderStatistics -Identity "Office 365 Sandbox" -FolderScope ConversationHistory -IncludeOldestAndNewestItems | ?{$_.FolderType -eq "TeamChat"} | Format-Table Name, ItemsInFolder, NewestItemReceivedDate  
Set-Mailbox -Identity "Office 365 Sandbox" -LitigationHoldEnabled $True -GroupMailbox
office-teams-windows-itprowindows-server-powershelloffice-teams-app-dev
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AaseNomad - We are looking into this I will get back to you soon.

0 Votes 0 ·
AaseNomad avatar image AaseNomad Sayali-MSFT-0291 ·

Thanks for the reply and Sound good. I’ll be waiting for you guys. Thanks

0 Votes 0 ·

@AaseNomad - Are you developing any Microsoft teams application?

0 Votes 0 ·
Show more comments

0 Answers