Extract Documents to Folder based on Managed Metadata Column - SharePoint

  How to Extract documents from Multiple Document libraries in to Folders. Each has a Managed Metadata Column with Sub Terms. I have created three Functions to  Download Document Create Folder Main Method Addition to above, script will log the Document URL and destination Folder Path in .log file Create Folder   Function   Create-Folder {      param  ( $folderPath )      if  (!( Test-Path  -path  $folderPath ))     {          New-Item   $folderPath  -type directory     } } Download Document ( this is stolen from Stackoverflow 😁 ) Function   Download-Document {      param ( $web ,  $folderPath ,  $docItem )       #File Download Snippet Reffered From : https://stackoverflow.com/questions/43350575/how-to-use-powershell-to-download-files-from-sharepoint        $File  =  $web .GetFile ( $docItem .Url )          $Binary  =  $File .OpenBinary ()          $detinationPath  =  $folderPath  +  "\"  +  $File .Name ;          $Stream  =  New-Object  System.IO.FileStream( $detinationPath

Enabling Nintex Workflow Feature Failed - Sorry, Something Went Wrong

Finally I was bring SharePoint 2019 Up and running on On Prem. Then I wanted to test my Nintex Workflows and tried to Enable the Nintex Workflow Feature on the Site Collection Level. Then... This Happen

The Error message which we all are familiar

Sorry, something went wrong

An unexpected error has occurred.
Technical Details
Date and Time: date and time

then I followed the old fashion ULS Logs check with my ULS Viewer 

Finally Found the Culprit 

Feature receiver assembly 'Nintex.Workflow.Features, Version=, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12', class 'Nintex.Workflow.Features.ContentTypeUpgradeFeatureEventHandler', method 'FeatureActivated' for feature '86c83d16-605d-41b4-bfdd-c75947899ac7' threw an exception: Nintex.Workflow.NWFeatureActivatingException: Nintex.Workflow.NWDatabaseConnectionException: Failed to open a connection to the Nintex Workflow configuration database. ---> System.Data.SqlClient.SqlException: Cannot open database " Nintex workflow configuration db" requested by the login. The login failed.  Login failed for user “Domain\webapppoolAccount”.   
 at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)   
 at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)   
 at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)   
 at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)   
 at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)   
 at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)   
 at System.Data.SqlClient.SqlConnection.Open()   
 at Nintex.Workflow.Administration.Database.OpenConnectionInternal(String connectionString)   
 at Nintex.Workflow.Administration.ConfigurationDatabase.OpenConfigDataBase()     -
-- End of inner exception stack trace ---   
 at Nintex.Workflow.Administration.ConfigurationDatabase.OpenConfigDataBase()   
 at Nintex.Workflow.Administration.Database.ExecuteReader(SqlCommand command, CommandBehavior behavior)   
 at Nintex.Workflow.Administration.GlobalConfig.LoadData()   
 at Nintex.Workflow.Administration.GlobalConfig.GetGlobalConfig(Boolean forceRefresh)   
 at Nintex.Workflow.Administration.ConfigSettings.GetConfigSettings(SPSite site)   
 at Nintex.Workflow.Common.NWSharePointObjects.<>c__DisplayClass2.<SetMultiOutcomeTaskEditForm>b__0()   
 at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)   
 at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)   
 at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)   
 at Nintex.Workflow.Common.NWSharePointObjects.SetMultiOutcomeTaskEditForm(SPWeb web)   
 at Nintex.Workflow.Features.ContentTypeUpgradeFeatureEventHandler.FeatureActivated(SPFeatureReceiverProperties props)   
 at Nintex.Workflow.Features.ContentTypeUpgradeFeatureEventHandler.FeatureActivated(SPFeatureReceiverProperties props)   
 at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)

Simply issue was In the Database Server, Nintex Workflow Configuration Database does not have enough permission for the Web Application App Pool Account. 


then I gave the same permission as Contant Database which is WSS_Content_Application_Pools Permission on DB Account Permission Section 

Then once permission provided, I was able to successfully enable the required Nintex Workflow Features 

hope This might help someone like me :) Leave me a comment in case if it was helpful. 

Pre-Upgrade Check List

Download Our Free SharePoint Pre-Upgrade Check List

* indicates required

Vintage Clan

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission - User Profile Issue

How to Create Host Header to SharePoint Web Application

SharePoint 2013 Access Denied in Site Collections in Web Application