“This script runs a discovery search on specified mailboxes over a period of time. The first time search is run, you can specify “start date” in search.config file. The current date is automatically used as the end date. For subsequent searches, start date is automatically obtained from the previous search. If previous search is successful, its end date is used as the start date for new search. If the previous search failed, the start date specified in that search is used as the start date for new search. This ensures that you don’t miss any messages due to a failed search. You can set frequency at which the script is run by using Task Scheduler.
Before running script, make sure that user account you use to run it’s added to Discovery Management RBAC role group,” explains Microsoft.
Here’s the snapshot of ECP after running the script weekly:
More Info: Download