Share via


Clear-MgSecurityCaseEdiscoveryCaseSearchData

Delete Exchange mailbox items or Microsoft Teams messages contained in an eDiscovery search. You can collect and purge the following categories of Teams content:- Teams 1:1 chats - Chat messages, posts, and attachments shared in a Teams conversation between two people. Teams 1:1 chats are also called conversations.- Teams group chats - Chat messages, posts, and attachments shared in a Teams conversation between three or more people. Also called 1:N chats or group conversations.- Teams channels - Chat messages, posts, replies, and attachments shared in a standard Teams channel.- Private channels - Message posts, replies, and attachments shared in a private Teams channel.- Shared channels - Message posts, replies, and attachments shared in a shared Teams channel. For more information about purging Teams messages, see:- eDiscovery solution series: Data spillage scenario - Search and purge- eDiscovery (Premium) workflow for content in Microsoft Teams

Note

To view the beta release of this cmdlet, view Clear-MgBetaSecurityCaseEdiscoveryCaseSearchData

Syntax

PurgeExpanded (Default)

Clear-MgSecurityCaseEdiscoveryCaseSearchData
    -EdiscoveryCaseId <string>
    -EdiscoverySearchId <string>
    [-ResponseHeadersVariable <string>]
    [-AdditionalProperties <hashtable>]
    [-PurgeAreas <string>]
    [-PurgeType <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-PassThru]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Purge

Clear-MgSecurityCaseEdiscoveryCaseSearchData
    -EdiscoveryCaseId <string>
    -EdiscoverySearchId <string>
    -BodyParameter <IPathsMs4I8WSecurityCasesEdiscoverycasesEdiscoverycaseIdSearchesEdiscoverysearchIdMicrosoftGraphSecurityPurgedataPostRequestbodyContentApplicationJsonSchema>
    [-ResponseHeadersVariable <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-PassThru]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

PurgeViaIdentityExpanded

Clear-MgSecurityCaseEdiscoveryCaseSearchData
    -InputObject <ISecurityIdentity>
    [-ResponseHeadersVariable <string>]
    [-AdditionalProperties <hashtable>]
    [-PurgeAreas <string>]
    [-PurgeType <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-PassThru]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

PurgeViaIdentity

Clear-MgSecurityCaseEdiscoveryCaseSearchData
    -InputObject <ISecurityIdentity>
    -BodyParameter <IPathsMs4I8WSecurityCasesEdiscoverycasesEdiscoverycaseIdSearchesEdiscoverysearchIdMicrosoftGraphSecurityPurgedataPostRequestbodyContentApplicationJsonSchema>
    [-ResponseHeadersVariable <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-PassThru]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Delete Exchange mailbox items or Microsoft Teams messages contained in an eDiscovery search. You can collect and purge the following categories of Teams content:- Teams 1:1 chats - Chat messages, posts, and attachments shared in a Teams conversation between two people. Teams 1:1 chats are also called conversations.- Teams group chats - Chat messages, posts, and attachments shared in a Teams conversation between three or more people. Also called 1:N chats or group conversations.- Teams channels - Chat messages, posts, replies, and attachments shared in a standard Teams channel.- Private channels - Message posts, replies, and attachments shared in a private Teams channel.- Shared channels - Message posts, replies, and attachments shared in a shared Teams channel. For more information about purging Teams messages, see:- eDiscovery solution series: Data spillage scenario - Search and purge- eDiscovery (Premium) workflow for content in Microsoft Teams

Permissions

Permission type Permissions (from least to most privileged)
Delegated (work or school account) eDiscovery.ReadWrite.All,
Delegated (personal Microsoft account) Not supported
Application eDiscovery.ReadWrite.All,

Examples

Example 1: Code snippet


Import-Module Microsoft.Graph.Security

$params = @{
	purgeType = "recoverable"
	purgeAreas = "teamsMessages"
}

Clear-MgSecurityCaseEdiscoveryCaseSearchData -EdiscoveryCaseId $ediscoveryCaseId -EdiscoverySearchId $ediscoverySearchId -BodyParameter $params

This example shows how to use the Clear-MgSecurityCaseEdiscoveryCaseSearchData Cmdlet.

Parameters

-AdditionalProperties

Additional Parameters

Parameter properties

Type:System.Collections.Hashtable
Supports wildcards:False
DontShow:False

Parameter sets

PurgeViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PurgeExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BodyParameter

To construct, see NOTES section for BODYPARAMETER properties and create a hash table.

Parameter properties

Type:Microsoft.Graph.PowerShell.Models.IPathsMs4I8WSecurityCasesEdiscoverycasesEdiscoverycaseIdSearchesEdiscoverysearchIdMicrosoftGraphSecurityPurgedataPostRequestbodyContentApplicationJsonSchema
Supports wildcards:False
DontShow:False

Parameter sets

PurgeViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
Purge
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Break

Wait for .NET debugger to attach

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EdiscoveryCaseId

The unique identifier of ediscoveryCase

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

PurgeExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Purge
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EdiscoverySearchId

The unique identifier of ediscoverySearch

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

PurgeExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Purge
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Headers

Optional headers that will be added to the request.

Parameter properties

Type:System.Collections.IDictionary
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-HttpPipelineAppend

SendAsync Pipeline Steps to be appended to the front of the pipeline

Parameter properties

Type:

Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]

Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HttpPipelinePrepend

SendAsync Pipeline Steps to be prepended to the front of the pipeline

Parameter properties

Type:

Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]

Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Parameter properties

Type:Microsoft.Graph.PowerShell.Models.ISecurityIdentity
Supports wildcards:False
DontShow:False

Parameter sets

PurgeViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
PurgeViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Returns true when the command succeeds

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Proxy

The URI for the proxy server to use

Parameter properties

Type:System.Uri
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProxyCredential

Credentials for a proxy server to use for the remote call

Parameter properties

Type:System.Management.Automation.PSCredential
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProxyUseDefaultCredentials

Use the default credentials for the proxy

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PurgeAreas

purgeAreas

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

PurgeViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PurgeExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PurgeType

purgeType

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

PurgeViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PurgeExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResponseHeadersVariable

Optional Response Headers Variable.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False
Aliases:RHV

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.Graph.PowerShell.Models.IPathsMs4I8WSecurityCasesEdiscoverycasesEdiscoverycaseIdSearchesEdiscoverysearchIdMicrosoftGraphSecurityPurgedataPostRequestbodyContentApplicationJsonSchema

{{ Fill in the Description }}

Microsoft.Graph.PowerShell.Models.ISecurityIdentity

{{ Fill in the Description }}

System.Collections.IDictionary

{{ Fill in the Description }}

Outputs

System.Boolean

{{ Fill in the Description }}

Notes

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

BODYPARAMETER <IPathsMs4I8WSecurityCasesEdiscoverycasesEdiscoverycaseIdSearchesEdiscoverysearchIdMicrosoftGraphSecurityPurgedataPostRequestbodyContentApplicationJsonSchema>: . [(Any) <Object>]: This indicates any property can be added to this object. [PurgeAreas <String>]: purgeAreas [PurgeType <String>]: purgeType

INPUTOBJECT <ISecurityIdentity>: Identity Parameter [AlertId <String>]: The unique identifier of alert [ArticleId <String>]: The unique identifier of article [ArticleIndicatorId <String>]: The unique identifier of articleIndicator [AttackSimulationOperationId <String>]: The unique identifier of attackSimulationOperation [AuthoredNoteId <String>]: The unique identifier of authoredNote [AuthorityTemplateId <String>]: The unique identifier of authorityTemplate [CaseOperationId <String>]: The unique identifier of caseOperation [CategoryTemplateId <String>]: The unique identifier of categoryTemplate [CitationTemplateId <String>]: The unique identifier of citationTemplate [ContentFormats <String[]>]: Usage: contentFormats={contentFormats} [DataSourceId <String>]: The unique identifier of dataSource [DepartmentTemplateId <String>]: The unique identifier of departmentTemplate [DispositionReviewStageNumber <String>]: The unique identifier of dispositionReviewStage [EdiscoveryCaseId <String>]: The unique identifier of ediscoveryCase [EdiscoveryCustodianId <String>]: The unique identifier of ediscoveryCustodian [EdiscoveryNoncustodialDataSourceId <String>]: The unique identifier of ediscoveryNoncustodialDataSource [EdiscoveryReviewSetId <String>]: The unique identifier of ediscoveryReviewSet [EdiscoveryReviewSetQueryId <String>]: The unique identifier of ediscoveryReviewSetQuery [EdiscoveryReviewTagId <String>]: The unique identifier of ediscoveryReviewTag [EdiscoveryReviewTagId1 <String>]: The unique identifier of ediscoveryReviewTag [EdiscoverySearchId <String>]: The unique identifier of ediscoverySearch [EndUserNotificationDetailId <String>]: The unique identifier of endUserNotificationDetail [EndUserNotificationId <String>]: The unique identifier of endUserNotification [FilePlanReferenceTemplateId <String>]: The unique identifier of filePlanReferenceTemplate [HealthIssueId <String>]: The unique identifier of healthIssue [HostComponentId <String>]: The unique identifier of hostComponent [HostCookieId <String>]: The unique identifier of hostCookie [HostId <String>]: The unique identifier of host [HostPairId <String>]: The unique identifier of hostPair [HostPortId <String>]: The unique identifier of hostPort [HostSslCertificateId <String>]: The unique identifier of hostSslCertificate [HostTrackerId <String>]: The unique identifier of hostTracker [IncidentId <String>]: The unique identifier of incident [IntelligenceProfileId <String>]: The unique identifier of intelligenceProfile [IntelligenceProfileIndicatorId <String>]: The unique identifier of intelligenceProfileIndicator [LabelIds <String[]>]: Usage: labelIds={labelIds} [LandingPageDetailId <String>]: The unique identifier of landingPageDetail [LandingPageId <String>]: The unique identifier of landingPage [Locale <String>]: Usage: locale='{locale}' [LoginPageId <String>]: The unique identifier of loginPage [PassiveDnsRecordId <String>]: The unique identifier of passiveDnsRecord [PayloadId <String>]: The unique identifier of payload [RetentionEventId <String>]: The unique identifier of retentionEvent [RetentionEventTypeId <String>]: The unique identifier of retentionEventType [RetentionLabelId <String>]: The unique identifier of retentionLabel [SecureScoreControlProfileId <String>]: The unique identifier of secureScoreControlProfile [SecureScoreId <String>]: The unique identifier of secureScore [SensitivityLabelId <String>]: The unique identifier of sensitivityLabel [SensitivityLabelId1 <String>]: The unique identifier of sensitivityLabel [SensorId <String>]: The unique identifier of sensor [SimulationAutomationId <String>]: The unique identifier of simulationAutomation [SimulationAutomationRunId <String>]: The unique identifier of simulationAutomationRun [SimulationId <String>]: The unique identifier of simulation [SiteSourceId <String>]: The unique identifier of siteSource [SslCertificateId <String>]: The unique identifier of sslCertificate [SubcategoryTemplateId <String>]: The unique identifier of subcategoryTemplate [SubdomainId <String>]: The unique identifier of subdomain [SubjectRightsRequestId <String>]: The unique identifier of subjectRightsRequest [TrainingId <String>]: The unique identifier of training [TrainingLanguageDetailId <String>]: The unique identifier of trainingLanguageDetail [UnifiedGroupSourceId <String>]: The unique identifier of unifiedGroupSource [UserId <String>]: The unique identifier of user [UserPrincipalName <String>]: Alternate key of user [UserSourceId <String>]: The unique identifier of userSource [VulnerabilityComponentId <String>]: The unique identifier of vulnerabilityComponent [VulnerabilityId <String>]: The unique identifier of vulnerability [WhoisHistoryRecordId <String>]: The unique identifier of whoisHistoryRecord [WhoisRecordId <String>]: The unique identifier of whoisRecord