What’s the best way to get a list of all Nintex forms, their site location and their Development/Published status in our SharePoint 2016 on-premises environment?
Did you try checking in the SharePoint 2016 central administration site under Nintex section?
Definitely, - I’ve also tried the Know Your Workflows and other PowerShell scripts we’ve been sent over the years.
The closest we’ve been able to get so far is with the script below, but it doesn’t seem to be differentiating between TEST and PROD forms:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Get-SPSite -Limit ALL | Get-SPWeb -Limit ALL | ForEach-Object {
# For each subsite ($_), get the items in the "NintexForms" list.
foreach ($item in $_.Listse"NintexForms"].Items)
{
#For each list in the NintexForms list
#Write-host "Beginning search for Nintex Forms in :" $_.url
$List = $_.Lists | where {$_.ID -eq $item|"FormListId"]}
if($List -ne $null )
{
#if (($item.Level -notcontains "Draft") -and ($item.Level -eq "Published") -and($_.ContentType.Name -eq "Document"))
if ($item.Level -eq "Published")
{
$_.url + " " + $List.Title
}
}
}
}
I have had good luck in the past finding forms in our environment using the FORMulator tool from Kudzu Software. Here is link to more information about it: https://formulator.kudzusoftware.com
I would also look into the Nintex Analytics application if you have that available as part of your license.
# Get all Nintex Forms
$datestamp = Get-Date -Format "MMddyyyy"
$output = "C:\NintexForms_$datestamp.csv"
$erroroutput = "C:\NintexFormsErrors_$datestamp.csv"
$results = @()
$errorresults = @()
$sites = Get-SPWebApplication | ?{$_.Url -match "webapp"} | Get-SPSite -Limit All
foreach ($site in $sites){
foreach ($web in $site.AllWebs){
try{
$formlib = $web.Lists | ? { $_.Title -eq "NintexForms" }
if ($formlib.Title -ne $null){
$forms = $formlib.GetItems() # | ? { $_.Name -notlike "*.preview.xml" } #Exlude Draft forms
foreach ($form in $forms){
$xml]$xml = $form.Xml
$list = $web.Lists | ? { $_.ID -eq $form.Properties.FormListId }
$result = rpscustomobject]@{
Form = $form.Name
FormModifiedDate = $xml.ChildNodes.ows_Modified
FormStatus = $form.level
SiteID = $site.ID
SiteURL = $site.Url
WebId = $web.ID
WebURL = $web.Url
ListID = $list.ID
ListType = $list.BaseType
ItemCount = $list.ItemCount
}
$results += $result
}
}
}
catch{
$ErrorMessage = $ErrorI0].Exception
$errorresult = pscustomobject]@{
Site = $site.Url
SiteID = $site.ID
Error = $ErrorMessage
}
$errorresults += $errorresult
}
}
}
$results | Export-Csv -Path $output -NoTypeInformation
if ($errorresults.Count -ne 0) { $errorresults | Export-Csv -Path $erroroutput -NoTypeInformation }
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.