Stream
1 TopicStream Audit Log - Script to check who viewed/liked a video returns the same element multiple times
Hello everyone, I have been asked to find out who viewed/liked a specific video in Microsoft Stream. I am using the following script to get the first info (for the second I replace the StreamInvokeVideoView with StreamInvokeVideoLike): $StartDate = (Get-Date).AddDays(-30) $EndDate = (Get-Date) $Viewers = Search-UnifiedAuditLog -StartDate $StartDate -EndDate $EndDate -RecordType MicrosoftStream -Operations StreamInvokeVideoView -ObjectIds "VIDEOLINK" -ResultSize 500 | Sort-Object CreationDate $ConvertAudit = $Viewers | Select-Object -ExpandProperty AuditData | ConvertFrom-Json $ConvertAudit | Select-Object CreationTime, ResourceTitle, UserId, ClientIP, Operation, Workload, ResultStatus The issue I am having is that when I check the $Viewers and the $ConvertAudit variables, I have several repeated elements (e.g. I see the same user with the same creationdate and the same auditdata repeated almost 100 times). What am I doing wrong? I will then export the results to a csv or xlsx file. Any help would be greatly appreciated! Many thanks in advance! FrancescoSolved1.3KViews0likes2Comments