Extract Documents to Folder based on Managed Metadata Column - SharePoint

Image
  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

Task applicationcontent has failed with an unknown exception

XML Error -


Task applicationcontent has failed with an unknown exception



SharePoint 2013 Product Configuration wizard Failed during the Cumulative Update installation with below error

Task applicationcontent has failed with an unknown exception
 ERR                  Exception: System.NullReferenceExceptionObject reference not set to an instance of an object.
   at Microsoft.SharePoint.Administration.SPAspConfigurationFile.ApplyActionToXmlDocument(XmlDocument xdActionXmlDocument xdString sourceFileNameSupportedXmlDocutmentActions supportedActions)
   at Microsoft.SharePoint.Administration.SPAspConfigurationFile.MergeWebConfig(XmlDocument xdWebConfigString fileMask)
   at Microsoft.SharePoint.Administration.SPWebService.ApplyApplicationContentToLocalServer()
   at Microsoft.SharePoint.PostSetupConfiguration.ApplicationContentTask.Run()

   at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()
Finally Microsoft Article came in to rescue saying this error caused because Web Application Web Configs are having Commented lines <!—comments --!>

When we remove the comments in Web Config  PSConfig executed successfully 

Microsoft Article

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