question

spadmin avatar image
0 Votes"
spadmin asked ·

external XSLT is expiring in classic sites

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?

office-sharepoint-online
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JulieWang-MSFT avatar image
0 Votes"
JulieWang-MSFT answered ·

Hi @spadmin,

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.


· 3 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1) Does it iterate through all the webs?

2) Should the title call "DataformsWebpart" ?

0 Votes 0 ·

Hi @spadmin,

1)It will effect on one site every time.

2)I am afraid the web part title is named by yourself, try to run it and check it.

0 Votes 0 ·

Hi @spadmin,

Is there any progress on this issue?

Please feel free to reply.

0 Votes 0 ·