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
US West Region is: https://uswe-1.api.microsoftstream.com/api/
Wish I could get info on whether or not the video is shared and who it's shared with. Including the Entire Company or not. Thanks for your good work! Also, there was no Make Directory commands setup for the folder structure. I had to manually create these: stream-analysis\VideosJSON.
I just processed 27 pages worth.
Here are some additional updates. Back in March 2020, when MS deployed the admin mode and admin page our default sharing changed so that every new recording had "organization" permissions on it. This means anyone in the domain could watch any of our recorded meetings. This was not good, hence why I am here. I found out how to filter the output of this script to only include those made available to the whole org.
In the StreamAPIVideos100 string, add the following right before &adminmode
%20and%20privacymode%20eq%20%27organization%27%20
Additionally, in the $dataum string building area add the following line:
$datum | Add-Member -MemberType NoteProperty -Name PrivacyMode -Value $myVideo.privacymode
This new line will add a column in the .csv file output, so if you want to not do the first edit, but simply list the privacy mode for each video, only add the datum code above. I had 2600+ videos, so for me, filtering by "organization" works much better as it get's rid of most of the extra unnecessary work.
Here is the entire string for the org filter in the first edit.
[string]$StreamAPIVideos100 = "https://$rootAPIlocation.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)%20and%20privacymode%20eq%20%27organization%27%20&adminmode=true&api-version=1.4-private&`$skip=0" #$streamapichannels100