AnsweredAssumed Answered

How to deal errors from NWAdmin in PowerShell Script

Question asked by simran07 on Apr 29, 2016
Latest reply on May 3, 2016 by simran07

Hi Team,

I am trying to remove all out of sync workflows from my SharePoint environment. I am using below command to execute for all the site collections where NW feature is enabled.

                             .\NWAdmin.exe -o SyncTerminatedWorkflows -url http://siteURL

But there are few site collections where i get below error. I want my script to continue with the remaining sites whenever we get error. Can you suggest how can i deal with this? Also what is the reason behind below error?                           



System.NullReferenceException: Object reference not set to an instance of an object.

   at Nintex.Workflow.NWAdmin.SyncTerminatedWorkflows.CancelWorkflow(SPWeb web, Guid instanceId, String category)

   at Nintex.Workflow.NWAdmin.SyncTerminatedWorkflows.Execute()

Continue processing?


Thanks & Regards,