Deploying InfoPath Form using PowerShell

Deploying InfoPath form using PowerShell script is very much possible in SharePoint Environment.
Here is how you can uninstall the existing form and re deploy it

Uninstall-SPInfoPathFormTemplate -Identity BusinessForm.xsn
   * This will uninstall the InfoPath form if it exists.

Install-SPInfoPathFormTemplate -Path C:\BusinessForm.xsn
  * This will install the InfoPath form from the local drive.

Enable-SPInfoPathFormTemplate -Identity "BusinessForm.xsn" -Site http://mysite/testSite
  * This will associate Business Form InfoPath with the sharepoint site http://mysite/testSite

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now