Find All InfoPath List Forms in SharePoint using PowerShell
Requirement: Find all customized InfoPath list forms in SharePoint. Tasked to report a listing all the InfoPath List forms customized in SharePoint web application during a migration project.
PowerShell Script to Find All InfoPath List Forms in SharePoint
Related Post: Find all InfoPath Form Libraries in SharePoint
PowerShell Script to Find All InfoPath List Forms in SharePoint
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Configuration parameters $WebAppURL="https://intranet.crescent.com" $ReportOutput="C:\InfoPath-ListForms.csv" #Array to Hold Result - PSObjects $ResultColl = @() #Get All Webs of the Web Application $WebsColl = Get-SPWebApplication $WebAppURL | Get-SPSite -Limit All | Get-SPWeb -Limit All #Iterate through each web Foreach($Web in $WebsColl) { #Get All Lists with InfoPath List Forms in use Foreach ($List in $web.Lists | Where { $_.ContentTypes[0].ResourceFolder.Properties["_ipfs_infopathenabled"]}) { Write-Host "Found an InfoPath Form at: $($Web.URL), $($List.Title)" $Result = new-object PSObject $Result | add-member -membertype NoteProperty -name "Site URL" -Value $web.Url $Result | add-member -membertype NoteProperty -name "List Name" -Value $List.Title $Result | add-member -membertype NoteProperty -name "List URL" -Value "$($Web.Url)/$($List.RootFolder.Url)" $Result | add-member -membertype NoteProperty -name "Template" -Value $list.ContentTypes[0].ResourceFolder.Properties["_ipfs_solutionName"] $ResultColl += $Result } } #Export Results to a CSV File $ResultColl | Export-csv $ReportOutput -notypeinformation Write-Host "InfoPath Lists Forms Report has been Generated!" -f GreenThis script generates a CSV output report as below:
Related Post: Find all InfoPath Form Libraries in SharePoint
Hi,
ReplyDeleteCan you include last modified date on this script?
Thanks,
VS
Can you please share steps as how to execute above command
ReplyDeleteJust copy the script to any of your SharePoint On-premises Server, change the parameters like $WebAppURL according to your environment and execute it with PowerShell ISE (Safer side!).
DeleteIs there any way you can do this for InfoPath Form Libraries? I saw your other post to pull InfoPath libraries (https://www.sharepointdiary.com/2012/09/find-all-infopath-form-libraries.html) but it was for SP 2007. Would this work for SP 2016?
ReplyDeleteYes! it works on SharePoint 2016 as well.
Deletewhat is the way to get same details for sharepoint online sites
ReplyDelete