0

I'm trying to search the MS 365 unified audit log with the Search-UnifiedAuditLog commandlet and no matter what I do, the max results it will return is 180. My code is pretty simple (below), the ResultSize parameter works if I set it below 180 (150 returns 150 records), but anything over 180 and I only get 180. I cannot figure out what I'm doing wrong and haven't seen any other reference to this limitation anywhere other than to use the -ResultSize parameter. Any thoughts?

$Audit = Search-UnifiedAuditLog -StartDate $StartDate -EndDate $EndDate -UserIds $UserID -ResultSize 5000

Write-Host $Audit.Count returns 180 regardless of how many records should be returned. Same with exporting to a csv, 180 is the max returned.

ccoho
  • 1

0 Answers0