{"id":2350,"date":"2017-08-29T21:22:00","date_gmt":"2017-08-29T21:22:00","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2350"},"modified":"2017-08-29T21:22:43","modified_gmt":"2017-08-29T21:22:43","slug":"enable-litigation-hold-for-all-mailboxes-in-office-365","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2350","title":{"rendered":"Enable Litigation Hold for all Mailboxes in Office 365"},"content":{"rendered":"<p>There\u2019s no built-in feature at this time to enable litigation hold for all mailboxes in Exchange Online, but some\u00a0organisations have this as a requirement. Here\u2019s a script that can be run ad-hoc to enable litigation hold for all mailboxes. When prompted, enter your Exchange Online credentials.<\/p>\n<p>&nbsp;<\/p>\n<p># Connect to Exchange Online<br \/>\n$exo = New-PSSession -ConfigurationName Microsoft.Exchange `<br \/>\n-ConnectionUri https:\/\/ps.outlook.com\/powershell-liveid `<br \/>\n-Authentication Basic `<br \/>\n-AllowRedirection `<br \/>\n-Credential $(Get-credential)<\/p>\n<p>Import-PSSession $exo<\/p>\n<p># Get all mailboxes that do not have litigation hold enabled<br \/>\n$mailboxes = Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq &#8220;UserMailbox&#8221;} |<br \/>\nWhere {$_.LitigationHoldEnabled -ne $true}<\/p>\n<p># Enable litigation hold<br \/>\n$mailboxes | Set-Mailbox -LitigationHoldEnabled $true<\/p>\n<p>Remove-PSSession $exo<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There\u2019s no built-in feature at this time to enable litigation hold for all mailboxes in Exchange Online, but some\u00a0organisations have this as a requirement. Here\u2019s a script that can be run ad-hoc to enable litigation hold for all mailboxes. When prompted, enter your Exchange Online credentials. &nbsp; # Connect to Exchange Online $exo = New-PSSession [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,62,60],"tags":[],"class_list":["post-2350","post","type-post","status-publish","format-standard","hentry","category-exchange-2013","category-microsoft-exchange-server-2016","category-office-365"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2350"}],"version-history":[{"count":2,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2350\/revisions"}],"predecessor-version":[{"id":2352,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2350\/revisions\/2352"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}