When we have huge number of users we will not get the required results as our environment would produce extremely huge number of results which spanned multiple pages. By default only 1000 items will be present in a page and only the first page will be displayed.
We can increase the number of items to be displayed to 5000, using the below command, still you might not get the required result if the output spans multiple pages.
https://blogs.technet.microsoft.com/eopfieldnotes/2014/12/16/message-trace-the-powershell-way/
Get-MessageTrace -StartDate $dateStart -EndDate $dateEnd -PageSize 5000 | Where {$_.Subject -like “*example*”} | ft -Wrap
with -page (vaule from 1-1000) can get search results up to 5000×1000 entries
https://blogs.technet.microsoft.com/praveenkumar/2015/08/12/message-tracking-by-subject/
|export-csv -append
export to csv file with append more than 5000 entries.