Forum Discussion
Powershell Script to list ALL videos in your 365 Stream environment
- Oct 22, 2022
Anyone looking at this script should also look at the PowerShell script that was released by Microsoft as part of the Stream (Classic) migration tools. The PowerShell script released by Microsoft can be downloaded directly from Stream (Classic) admin page and also has a PowerBI Desktop template that can be used to analyze the output CSVs.
See this part of the migration help articles for more info:
https://learn.microsoft.com/stream/streamnew/migration-details#stream-classic-video-report
Has anyone had success with pulling the lastViewDate? All of my videos show "null" in the raw JSON data. This value would be very valuable for helping to determine when a video was last viewed.
Scott
Hi scottcampany
Stream doesn't seem to hold this data. The json that comes back contains some information userData.lastViewDate BUT this is for the currently viewing user . In the case of this code it would be the last time this user viewed this video.
As far as I know this information isn't held anywhere other than perhaps in your network log files on a router somewhere.
But once the videos have moved to SharePoint / OneDrive then the GraphAPI does have information about Viewers and Views for each file.