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
However... When I run the code from this blog (https://euno-1.api.microsoftstream.com/api/videos?NoSignUpCheck=1&$top=100 ... etc) , I get one page of JSON, but when I use a similar solution link here: https://techcommunity.microsoft.com/t5/microsoft-stream-forum/powershell-script-to-audit-and-export-channel-content-details-of/m-p/354832 that calls Channels (https://euno-1.api.microsoftstream.com/api/channels?$top=100... etc ) I get two pages of JSON and more videos listed. But that code doesn't give me the duration and video.
I realised that Ryechz down below said to add this: %20and%20privacymode%20eq%20%27organization%27%20 before &adminmode
Once I removed that, I then got all the videos.
Still no size 😞 But I think I might be able to fudge that based on duration and height/width to at least get a rough idea. 720p HD is about 5 MB per minute
One trap for noobies is that in the scripit it first goes and purges and json files in the target directory. So if you have run this once to generate them, and realised you didn't have enough URLs, and run it a second time... so a bit of defensive code to compress-archive and move might be better 🙂
Oh also, I guess you could probably add Start-Process -FilePath 'chrome.exe' -ArgumentList 'https://euno-1.api.microsoftstream.com/api/videos?NoSignUpCheck=1...... etc' to where you generate the URLs to save some time.
Cool piece of work though!
- JavierBachOct 22, 2022Copper Contributor
ConradMurray Hi there is a way to get who uploaded the video ?
Thanks
- JavierBachOct 24, 2022Copper Contributor
JavierBach To add some more context, when I ran the script it does not get any data on owners, so I was thinking if at last it gets the "uploader" field that is showed when you run a search in admin mode for me is enough
There is something that can be modified on the script to get that info on the csv output?
Thanks in advance
- Marc MrozOct 22, 2022
Microsoft
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
- Dorje-McKinnonOct 24, 2022Iron Contributor
Many thanks for the link Marc Mroz
- Dorje-McKinnonJul 06, 2021Iron Contributor
Thanks ConradMurray
for the updates and comments, I'm sure they'll help everyone out.
When I have to come back to this code for work - next few weeks I'll incorporate what you've provided and update the code.
Dorje
- DazzaRJul 16, 2021Iron Contributor
Don't suppose you could record a video of setting it up and running it? I tried to get it working but failed somewhere and wasn't sure from the instructions what to expect so I parked it for a later date.
edit: got it working thanks