Form inventory in the tenant
A script for administrators that lists all FormCraft 365 forms on chosen sites or across the whole tenant.
Prerequisites
- PowerShell 7 and the PnP.PowerShell module, version 2.x or newer.
- Permissions: SharePoint administrator, or site collection administrator on every scanned site.
-AllSitesneeds the tenant admin URL. - The script is read only: it changes nothing, stores no credentials and contains no tenant names. Connect with your own app registration (
-ClientId) or interactively (-Interactive).
Examples
.\Get-FormCraftInventory.ps1 -SiteUrl https://contoso.sharepoint.com/sites/hr -Interactive -OutputPath inventory.csv
.\Get-FormCraftInventory.ps1 -AllSites -AdminUrl https://contoso-admin.sharepoint.com -ClientId <guid> -IncludeSubwebs -OutputPath inventory.json
.\Get-FormCraftInventory.ps1 -SelfTest
The output goes to .csv or .json by extension; without -OutputPath it is written to the pipeline. -ThrottleDelayMs sets the pause between sites. The script lives in tools/governance/ in the repository.
Output columns
WebUrl, ListId, ListTitle, Orphaned, Source, Revision, ModifiedAt, ModifiedBy, Tabs, Sections, Fields, Rules, Variables, CustomButtons, HasScripts, Activated, Locked, Error
- Orphaned: the list the configuration belongs to no longer exists.
- Source:
config.json(current per-list storage) orlegacy(old<listId>.jsonfile). - HasScripts: the form contains custom scripts.
- Activated: the form is bound to a content type of the list.
- Locked: the configuration folder has its own (unique) permissions, see storage lock.
- Error: why a row could not be read (for example missing permission); the script carries on with the next web.