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
First of all HUGE THANK YOU for this script Dorje-McKinnon
Running your code that generates the URLs, I found we have 10,400+ videos in Stream. I knew we were over 1.3 TB of space, but I couldn't find a way in the MS Stream Admin pages to understand the size and scope of the problem. We are a global company and with everyone in lock-down for a year, this got out of hand in a hurry.
I also wanted to share some of the additional '$datum' I've added and found useful
$datum | Add-Member -MemberType NoteProperty -Name VideoDuration -Value $myVideo.media.duration
$datum | Add-Member -MemberType NoteProperty -Name VideoHeight -Value $myVideo.media.height
$datum | Add-Member -MemberType NoteProperty -Name VideoWidth -Value $myVideo.media.width
$datum | Add-Member -MemberType NoteProperty -Name VideoIsAudioOnly -Value $myVideo.media.isAudioOnly
$datum | Add-Member -MemberType NoteProperty -Name VideoContentType -Value $myVideo.contentType
these return values like the following
VideoDuration VideoHeight VideoWidth VideoIsAudioOnly
PT28M10.25S | 360 | 640 | FALSE |
PT1H55M13.6S | 360 | 640 | FALSE |
PT56M19.6S | 360 | 640 | FALSE |
PT28M14.144S | 1080 | 1920 | FALSE |
PT1H10M34.56S | 1080 | 1920 | FALSE |
Video Duration is going to be a bit tricky to parse out in Excel. And the VideoIsAudioOnly is returning FALSE on all videos so far, so I will leave that one out.
But again GREAT code here Dorje
Thank you,
Jonathan Ogden
Hi Jonathan_Ogden , did you find a way to get the size of the videos? I only get Width and Height but that is not helpful at all for the size.
Thanks a lot!