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
Thank you so much for this Dorje-McKinnon.
However I am not able to get the json content. When I paste them in Chroome:
I get an issue saying the query is invalid. I have tried withouth the double https// but same issue.
Appreaciate your help!!!
- Dorje-McKinnonAug 05, 2021Iron Contributor
Hi rrivero11 , take a look at the udpated code. I've put in the variables for USNO-1 so it may help you out.
- scottcampanyAug 05, 2021Copper ContributorI made a slight change to check for the "C:\Temp\streamanalysis" folder and if it does not exist then create it. This may be helpful for those who need to run the script more than once.
#enter where you on your computer you want the files to go
[string]$PowerShellScriptFolder = "C:\Temp\streamanalysis" #<<<< Update this value
if (-not(Test-Path C:\Temp\streamanalysis)) {
New-Item -Path $PowerShellScriptFolder -Force -ItemType Directory
}
#json files will be saved into "VideosJSON" folder
[string]$streamJSONfolder = Join-Path -Path $PowerShellScriptFolder -ChildPath "VideosJSON"
Cheers,
Scott
- Dorje-McKinnonJun 29, 2021Iron Contributor
I think you've set the
$rootAPIlocation
to https//uswe-1.api.microsoftstream.com/api/
so that when the code creates
$StreamAPIVideos100
it is wrong
you should set as follows: $rootAPIlocation = "uswe-1"- rrivero11Jun 29, 2021
Microsoft
Yes! Manage to solve that one! Thanks. Just wondering if finally you were able to obtain the size of each video, as that was the one I am looking for 🙂 Awesome solution btw! Great job and thanks for sharing