I downloaded the random sampling script from Microsoft and am using the online script. My goal is to be able to pull a random sample of emails from a set of users for someone to review. No search criteria. Just random sample of messages from within a specific date range.
(download script here)
http://gallery.technet.microsoft.com/office/Random-Sampling-for-0e761600
the error I'm getting says a parameter cannot be found that matches parameter name 'StartDate'
I think it's because of this last line.
New-MailboxSearch -Name $NameOfSearch -SourceMailboxes $randMBX[0..$totalMBX] -StartDate $StartDate.addminutes($randmins) -EndDate $StartDate.addminutes($randmins + ($totalperiod.totalminutes * $PercentSample *.01)) -TargetMailbox $DiscSearchMBX.alias -SearchQuery $SearchQuery -StatusMailRecipients $StatusMailRecipients
From what I was reading you can't specify a date/time range using New-MailboxSearch script. Anyone have a way around this?
thanks for your time.