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
I'm glad this has helped you and your users out.
Thanks so much for the extra properties of the videos, I've just this week been asked if I can get out the length of the videos, so great timing!
Dorje
Dorje-McKinnonThanks for your efforts to build the script and make our lives easier. However, when I rum the URL (After changing the values) I'm getting a blank excel file.
Can someone help me out here?
- Dorje-McKinnonAug 05, 2021Iron Contributor
Hi abrarali , try running the new code.
It will auto open the JSON browser tabs, which you need to then manually save (ctrl + s) as JSON files into the folder you define in the script.
Once those files exist, then your CSV file will contain something.
- Jonathan_OgdenFeb 23, 2021Copper Contributor
Here is the URL I use for Western US. different regions have different datacenters, so you need to update the first part of the URL, the uswe-1
https://uswe-1.api.microsoftstream.com/api/videos?NoSignUpCheck=1&$top=100&$orderby=publishedDate%20desc&$expand=creator,events&$filter=published%20and%20(state%20eq%20%27Completed%27%20or%20contentSource%20eq%20%27livestream%27)&adminmode=true&api-version=1.4-private&$skip=0
Sorry for the mess, I just wanted to remove any ID's and user info.
Here is the output from the browser.
I had to copy and paste this into a txt file, then change the .txt to .json
- Dorje-McKinnonMar 06, 2021Iron Contributorthanks for answering Jonathan_Ogden
- WhatTheForkApr 06, 2021Copper ContributorI tried running the script but is not providing me any list. It's just creating a blank cache csv file.