Mar 29 2023 09:09 AM
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 parts. I would like to have a check list of pages to fix after files are migrated. Some pages use web parts that point to Stream Classic channels, and some point to specific videos. I would like to report on all of them, even if the video name, title, or other data doesn't come across, I could still work through the list, fixing each page.
Have I just missed an announcement or post? Possibly a PNP module?
Any help is appreciated.
Thanks,
Mar 30 2023 09:49 AM
SolutionWell, 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
Mar 30 2023 11:07 AM
Mar 30 2023 12:24 PM
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
Mar 30 2023 01:07 PM
May 26 2023 07:58 AM
Feb 01 2024 03:16 AM
@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
Feb 05 2024 05:35 AM
Mar 30 2023 09:49 AM
SolutionWell, 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