My requirement is to get the list of all the fields/columns used in the designed infopath form when the powershell script is run over a site/site collection. Right now I'm able to locate the .xsn file with powershell script. But, I dont have any idea of it.
If I could get the Infopath form .xml file, I could traverse it to get all the list columns out of it. Help me if possible in this scenario.

Aman GuptaRank #193 · 12.4K reputationPosted Aug 2, 2020, 11:47 PM EDT
There are many ways to access the InfoPath form. In this solution, we are using the following steps to retrieve InfoPath form data.