List SharePoint InfoPath Forms

By James|April 1, 2014|,

So, my current place of employment has recently upgraded to SharePoint 2010.  Seriously, don't laugh.  In any case, our environment is fairly InfoPath heavy.  All existing forms were created with InfoPath 2007 as client based forms.  Some of the issues with client based forms include:

  • InfoPath has to be installed on every system where users require the ability to fill out forms
  • Users cannot access, complete and submit forms with mobile devices such as iPhone, iPad or BlackBerry
  • When your form template is updated, users often ignore or don't see the update notification and continue submitting old forms

I decided to upgrade the forms to SharePoint 2010 web based forms.  The first step was to find all the forms we had on our portal.

The following script will crawl a portal and return this information:

# Title:   ListInfoPathForms.ps1
# Version: 1.0, 22MAR14
# Author:  James Sanders
# Purpose: Find and list all InfoPath forms
 
# NOTE: To export to CSV, run ListInfoPathForms.ps1|Export-Csv <filename>.txt
 
Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue
 
$WebApp = Get-SPWebApplication -Identity http://your_web_app
$Count = 0
 
ForEach ($SPSite in $WebApp.Sites) {
  ForEach ($Web in $SPSite.AllWebs) {
    For ($i = 0;$i -ne $Web.lists.count;$i++) {
      $List = $Web.Lists[$i]
      If ($List.BaseTemplate -eq "XMLForm" -and $list.BaseType -eq "DocumentLibrary") {
        $O = New-Object PSObject
        $O | Add-Member NoteProperty Site $($List.ParentWeb.Title)
        $O | Add-Member NoteProperty URL $($List.ParentWeb.URL)
        $O | Add-Member NoteProperty Title $($List.Title)
        $Count++
        $O
      }
    }
  }
}

 

Copyright 2011 - 2021 The Lazy SharePoint Admin | All Rights Reserved
menu-circlecross-circle linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram