User Profile
ConradMurray
Brass Contributor
Joined 9 years ago
User Widgets
Recent Discussions
Re: Powershell Script to list ALL videos in your 365 Stream environment
Worked a charm again. Thanks, updates have been good. I think some users of the script might be trying to skip a few steps like setting the API Source in the script - most important otherwise your browser pages will 403. The save locations and then knowing that when the script pauses that you have to copy paste the browser page text into your OWN text files with a .json extension. Do all that, and you should be good to know. One thing I still really need is the file sizes though, any updates on that?Re: Powershell Script to list ALL videos in your 365 Stream environment
ScoutmanPt Thought this might be another option, but no... At line:237 char:40 + ContentType,Created,Modified, ` + ~ Missing argument in parameter list. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : MissingArgument and Get-StreamToken : The term 'Get-StreamToken' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:3 char:33 + $streamTokenConfiguration = Get-StreamToken -Tenant $Tenant -Cred ... + ~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-StreamToken:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Get-RequestedAssets : The term 'Get-RequestedAssets' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:4 char:18 + $allVideos = Get-RequestedAssets -token $streamTokenConfiguration ... + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-RequestedAssets:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Export-ReportAssets : The term 'Export-ReportAssets' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:5 char:5 + Export-ReportAssets -assets $allVideos -label "Videos"-fileName " ... + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Export-ReportAssets:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Export-ReportAssets : The term 'Export-ReportAssets' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:7 char:5 + Export-ReportAssets -assets $videosNotMigrated -label "VideosNotM ... + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Export-ReportAssets:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundExceptionRe: Powershell Script to list ALL videos in your 365 Stream environment
Hi. This is "almost" working perfectly. Once I got the Data Centre and realised the URLs in PowerShell were generated to use to paste into a browser, then copy and paste to a text file with a .son extension inside a directory I had to create called VideosJSON I was away. 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!
Recent Blog Articles
No content to show