Skip to main content
Nintex Community Menu Bar

Products: Nintex Forms 2010, Nintex Forms 2013

 

We sometimes get asked if there is a way to count the number of Nintex Forms in each Site Collection farm wide.

 

This PowerShell script will output each site collection URL in a SharePoint farm with a count of how many Nintex Forms are present in each site Collection.

 

PowerShell Script
  1. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
  2.  
  3. Get-SPSite | Get-SPWeb | ForEach-Object {
  4.  
  5. Write-host "Beginning search for Nintex Forms in :" $_.url
  6.  
  7. Write-host "Number of Nintex Forms in $($($($_.Lists."NintexForms"]).Items | ?{$_.ContentType.Name -eq "Document"} | ? {$_.level -notcontains "Draft"}).Count)"
  8.  
  9. }
 

 

Version History and other scripts can be found here: http://alps.codeplex.com

Is there a way to export the latest version of the form to a folder?


Good man Aaron!  Are you still updating your workflow analyzer tool?  This could be a welcome addition to that as well.


I have not had to make any updates in a couple of years now (other than moving the code over to GitHub and Azure). I am not sure if this would make sense in the tool. Currently the tool is 100% standalone and does not communicate with SharePoint/Nintex in any way.


Hey Aaron, is there a way to specify the name of the list the form appears in?


Yeah, I believe you can add a where clause in there. I will have a look later.


How can I find a list of Nintex workflows being used in all my site collections in SharePoint Online/O365 using PowerShell? I have seen a few solutions referenced back in 2015 for on-prem. Do you have an updated solution for O365/SharePoint online? 

Any help would be greatly appreciated.


Very Helpful I added a bit to it that someone may find helpful.   I lookup the list and display the name of the workflow.

 

Get-SPSite -Limit ALL | Get-SPWeb -Limit ALL | ForEach-Object {

foreach ($item in $_.Lists["NintexForms"].Items)

{

#Write-host "Beginning search for Nintex Forms in :" $_.url

$List = $_.Lists | ? {$_.ID -eq $item["FormListId"]}



if($List -ne $null )

{

if ($item.Level -eq "Published")

{

$_.url + " " + $List.Title

}

}

}

}

 

 

 


@Jeff-SP-Admin : I wrote a series of posts about finding where Nintex was added in O365 as well as all workflows. You might want to have a look at: https://community.nintex.com/t5/Community-Blogs/Migrate-your-tenant-to-another-data-center-3-of-3-where-are-all/ba-p/81720


I know this is an old post but for anyone looking to get a list of Nintex Forms in SharePoint Online you can use this PnP PowerShell script

# Connect to your SharePoint admin site
Connect-PnPOnline -Url "https://yourSPSiteName-admin.sharepoint.com/" -Interactive

$entitlementType = "<EntitlementType>Production</EntitlementType>"
$ProductionFormsCount = 0
$DevelopmentFormsCount = 0

# Get all site collections
$siteCollections = Get-PnPTenantSite

foreach ($SiteCollection in $SiteCollections) {
$SiteCollectionUrl = $SiteCollection.Url
try {
#Write-Host "Trying to connect to: $SiteCollectionUrl"
Connect-PnPOnline -Url $SiteCollection.Url -Interactive

# Check if the web has a "NintexForms" list
$nintexFormsList = Get-PnPList -Identity "NintexFormXml"

if ($null -ne $nintexFormsList) {
Write-Host "Site: $SiteCollectionUrl"
# Get all items in the "NintexForms" list
$nintexFormsItems = Get-PnPListItem -List $nintexFormsList

foreach ($item in $nintexFormsItems) {
$formType = ""

try {
$xmlFile = Get-PnPFile -Url $item["FileRef"] -AsString

if ($xmlFile -match $entitlementType) {
$formType = "Production"
}
else {
$formType = "Development"
}
}
catch {
Write-host -f foregroundcolor red "Encountered Error:"$_.Exception.Message
<#Do this if a terminating exception happens#>
}
$fileLeafRef = $item["FileLeafRef"]
$splitString = $fileLeafRef -split "_"
$listId = $splitString[1]

try {
$formList = Get-PnPList -Identity $listId
Write-Host ("Form Type: " + $formType + ", List Name: " + $formList.Title + ", View Url: " + $formList.RootFolder.ServerRelativeUrl )
if ($formType -eq "Production") {
$ProductionFormsCount = ($ProductionFormsCount + 1)
}
else {
$DevelopmentFormsCount = ($DevelopmentFormsCount + 1)
}

}
catch {
#Write-Host "List does not exist"

}
}
Write-Host " "
}
}
catch {
<#Do this if a terminating exception happens#>
}
}
Write-Host ("Production Forms Count: " + $ProductionFormsCount + ", Development Forms Count: " + $DevelopmentFormsCount)

 


Reply