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