Skip to content

Commit e16a412

Browse files
committed
Add litigation hold properties to Invoke-ListMailboxes and create Invoke-ExecSetLitigationHold function
1 parent b8df1c8 commit e16a412

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
function Invoke-ExecSetLitigationHold {
2+
<#
3+
.FUNCTIONALITY
4+
Entrypoint
5+
.ROLE
6+
Exchange.Mailbox.ReadWrite
7+
#>
8+
[CmdletBinding()]
9+
param($Request, $TriggerMetadata)
10+
11+
$APIName = $Request.Params.CIPPEndpoint
12+
$Headers = $Request.Headers
13+
Write-LogMessage -Headers $Headers -API $APIName -tenant $TenantFilter -message 'Accessed this API' -Sev 'Debug'
14+
15+
# Interact with the query or body of the request
16+
$TenantFilter = $Request.Body.tenantFilter
17+
$DisableLitHold = $Request.Body.disable -as [bool]
18+
Write-Host "TenantFilter: $TenantFilter"
19+
Write-Host "DisableLitHold: $DisableLitHold"
20+
21+
22+
23+
}

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Administration/Invoke-ListMailboxes.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ Function Invoke-ListMailboxes {
6969
HiddenFromAddressListsEnabled,
7070
ExternalDirectoryObjectId,
7171
MessageCopyForSendOnBehalfEnabled,
72-
MessageCopyForSentAsEnabled
72+
MessageCopyForSentAsEnabled,
73+
LitigationHoldEnabled,
74+
LitigationHoldDate,
75+
LitigationHoldDuration
7376
$StatusCode = [HttpStatusCode]::OK
7477
} catch {
7578
$ErrorMessage = Get-NormalizedError -Message $_.Exception.Message

0 commit comments

Comments
 (0)