Content Search

Microsoft Q & A 381 Reputation points
2023-05-09T18:08:47.5766667+00:00

After creating a content search "Remove Phishing Message", i am running below command to hard delete the items found under the content search.

New-ComplianceSearchAction -SearchName "Remove Phishing Message" -Purge -PurgeType HardDelete

I found as per Microsoft only 10 items will get delete after running this command once, is it correct.?

After this command what I understood we need to run the command to remove the compliance search action i.e. export file which will generate. Please share what command to be use for that.

or if i am not correct...running the same command again for hard delete will work to delete all items.

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Aholic Liang-MSFT 13,886 Reputation points Microsoft External Staff
    2023-05-10T06:35:59.9433333+00:00

    Hi @ Microsoft Q & A

    Yes.Delete messages using the new compliance search action, up to 10 items per mailbox at a time.

    However, if you need to export the project file, you need to use the export parameter, please refer to the following command:

    New-ComplianceSearchAction -SearchName " Remove Phishing Message" -Export
     
    

    In addition, kindly note that to use the Content Search tool (run and preview results, and export results), administrators must be a member of the eDiscovery Manager role group in the compliance portal.

      

    For more information, please refer to the following articles:

    Get started with Content search - Microsoft Purview (compliance) | Microsoft Learn

    Search for and delete messages in Exchange Server | Microsoft Learn


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Aholic Liang-MSFT 13,886 Reputation points Microsoft External Staff
    2023-05-16T09:59:00.1966667+00:00

    Hi,

    1. You need to connect to Connect to Security & Compliance PowerShell to run New-ComplianceSearchAction :Connect to Security & Compliance PowerShell | Microsoft Learn

    2.Then to use the New-ComplianceSearch command, refer to the following order:

    • Use the New-ComplianceSearch command to create a search
    • Run Start-Compliance Search to start the search
    • Run the New-ComplianceSearchAction command to preview or delete the search results.

    Please refer to this link for details:Search for and delete email messages in your organization - Microsoft Purview (compliance) | Microsoft Learn

    In addition, note that to create and run a Content Search, you must be a member of the eDiscovery Manager role group or assigned the Compliance Search role in the Microsoft Purview compliance portal.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.