Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jchable/6234bd200eae4109ac77717934d14ea0 to your computer and use it in GitHub Desktop.
Save jchable/6234bd200eae4109ac77717934d14ea0 to your computer and use it in GitHub Desktop.
Search for InfoPath form customization in SharePoint list
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
$WebAppURL="<webapp URL>"
$ReportOutput="<path to output CSV file>"
$ResultColl = @()
$WebsColl = Get-SPWebApplication $WebAppURL | Get-SPSite -Limit All | Get-SPWeb -Limit All
Foreach($Web in $WebsColl)
{
Foreach ($List in $web.Lists | Where {
$_.ContentTypes[0].ResourceFolder.Properties["_ipfs_infopathenabled"]})
{
Write-Host "InfoPath Form : $($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
}
}
$ResultColl | Export-csv $ReportOutput -notypeinformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment