external XSLT is expiring in classic sites

Tanmoy Das 806 Reputation points
2021-03-10T02:01:12.46+00:00

Hi,

As per MS, support for external XSLT files references in the DataFormsWebPart and its subclasses will no longer be available after March 14, 2021.

Is there a way we can conduct an audit of DataFormWebParts for all classic SharePoint pages?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,268 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JoyZ 18,056 Reputation points
    2021-03-10T07:48:47.28+00:00

    Hi anonymous user,

    Per my research, I could not find a way to directly conduct an audit of DataFormWebParts for all classic SharePoint pages.

    As a workaround, please use following PnP Powershell to get web parts from all pages on the site and create a CSV report:

    #Parameters  
    $SiteURL = "https://crescentintranet.sharepoint.com/sites/vendors"  
    $CSVPath = "C:\Temp\Webparts.csv"  
    $WebPartsData = @()  
       
    #Connect to SharePoint Online site  
    Connect-PnPOnline -Url $SiteURL -UseWebLogin  
       
    #Get all pages from "Site Pages" library  
    $SitePages = Get-PnPListItem -List "Site Pages"   
       
    #Iterate through each page  
    ForEach($Page in $SitePages)  
    {  
        #Get All Web parts from the page  
        $Webparts = Get-PnPWebPart -ServerRelativePageUrl $Page.FieldValues.FileRef  
       
        #Iterate through webparts and collect details  
        ForEach($Webpart in $Webparts)  
        {    
            #Get Web part properties  
            $WebPartsData += New-Object PSObject -Property @{  
                    "PageUrl" = $Page.FieldValues.FileRef  
                    "WebPart ID" = $Webpart.Id  
                    "WebPart Title" = $Webpart.WebPart.Title  
                    "Is Closed" = $Webpart.WebPart.IsClosed                  
                    "Hidden" = $Webpart.WebPart.Hidden  
                    "Zone Index" = $Webpart.WebPart.ZoneIndex  
                    "Allow Hide" = $Webpart.WebPart.Properties.FieldValues.AllowHide  
                }         
        }  
    }  
    #Export Web part data to CSV  
    $WebPartsData  
    $WebPartsData | Export-Csv -Path $CSVPath -NoTypeInformation  
    

    Then try to filter all DataFormsWebParts with web part title.

    More information for your reference:

    https://www.sharepointdiary.com/2019/08/sharepoint-online-web-part-usage-report-using-powershell.html

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.