Forum Discussion

Jonathan Bennington's avatar
Jonathan Bennington
Brass Contributor
Mar 29, 2023

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...
  • 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

Resources