Find blogs and classic pages RRS feed

  • Question

  • Hi,

    Does anyone know of a quick way to find where all your classic pages are and blog sites? The reason for this is we want to modernise them however we need to identify where they are first and their owners.



    Monday, December 9, 2019 4:53 AM


  • Hi,Clare,

    For searching all the classic pages, here I made a script as the starting point. It will return all the classic pages. One thing to mention, the modern pages not published with a banner image will also be counted as classic page by this script, you may need to do a bit more work about this. 

    $User = "user account" 
    $Creds = Get-Credential
    Connect-PnPOnline -Url $SiteUrl -Credentials $Creds 
    	    $items = $null 
                $items = Get-PnPListItem -List “SitePages” -Fields ID,Title,BannerImageUrl,FileRef -ErrorAction SilentlyContinue 
                    foreach($Page in $items) 
    		if($Page[“FileLeafRef”] -like '*.aspx')	{
                        Write-Host “.” -NoNewline 
                        if($Page[“BannerImageUrl”].Url -eq $null) 
                            Write-Host “.” -NoNewline 
                            $FileName = $Page[“FileLeafRef”] 
                            $PageUrl = “$($SiteUrl)/SitePages/$FileName” 
    			write-host $PageUrl

    For blog sites, here is a great script you can refer to:


    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Marked as answer by Walshey Tuesday, December 10, 2019 3:58 AM
    Monday, December 9, 2019 8:24 AM