Forum Discussion
Jonathan Bennington
Mar 29, 2023Brass Contributor
PowerShell Report to get all Stream Classic we parts on pages
Hello, Is there a PowerShell script that will allow me to report out all the Stream Classic web parts used in a site/site collection? We have hundreds of pages with embedded Stream Classic web par...
- Mar 30, 2023
Well, it seems easier than I originally thought. I'm using PNPSearchQuery to do this.
$SiteURL = "https://your.sharepoint.com" $ReportPath = "C:\Users\yourOneDrive\Reports\AllStreamWP.csv" #Connect to SharePoint Online site Connect-PnPOnline -Url $SiteURL -Interactive Submit-PnPSearchQuery -Query "FileExtension:aspx 275c0095-a77e-4f6d-a2a0-6a7626911518" -All -RelevantResults | select Title, OriginalPath | Export-csv $ReportPath
Jonathan Bennington
Mar 30, 2023Brass Contributor
Well, it seems easier than I originally thought. I'm using PNPSearchQuery to do this.
$SiteURL = "https://your.sharepoint.com"
$ReportPath = "C:\Users\yourOneDrive\Reports\AllStreamWP.csv"
#Connect to SharePoint Online site
Connect-PnPOnline -Url $SiteURL -Interactive
Submit-PnPSearchQuery -Query "FileExtension:aspx 275c0095-a77e-4f6d-a2a0-6a7626911518" -All -RelevantResults | select Title, OriginalPath | Export-csv $ReportPath
- id_snakeMar 30, 2023Iron ContributorHi Jonathan! Thanks for pointing this out! I was looking for the Script as well.
One question: Will it recognize embedded for all web pages / services (for ex. we use embedded videos on Quercus platform)?- Jonathan BenningtonMar 30, 2023Brass Contributor
Hi, id_snake Yes, I used this id "490d7c76-1824-45b2-9de3-676421c997fa" to find all the embedded web parts. I think that's a good starting point, although you'll likely get some false positives that aren't embedded Stream videos.
Whole string would be:Submit-PnPSearchQuery -Query "FileExtension:aspx 490d7c76-1824-45b2-9de3-676421c997fa" -All -RelevantResults | select Title, OriginalPath | Export-csv $ReportPath
- id_snakeMar 30, 2023Iron ContributorOh, that sounds good, thanks again! Appreciate your answer to originally your question! ;))
- sushilmaurya7115Feb 01, 2024Copper Contributor
Jonathan Bennington
I have Embed and Stream webpart with same IDs in SPO sites, when I run this script does not show the items in search result. Please help me if any additional steps are quired. Thanks- sushilmaurya7115Feb 05, 2024Copper ContributorI tried the same script on some other tenant, it works fine there. Thank you.