1

I have a Powershell script that I am using to move SharePoint 2010 Document Sets from one document library to another document library in the same site. The script works fine for most of the document sets, but for some it does not. Here is the relevant portion of the script:

$web = get-spweb http://mysite
$list = $web.Lists["Purchase Orders Archive"]
$item = getItem $list "7581"
$docSet = [Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet]::GetDocumentSet($item.Folder)
[Byte[]] $compressedFile = $docset.Export()

The getItem function locates a specific document set within the library. I know that I am getting the correct document library item back because I have inspected the return $item variable values. The problem is that on some document sets, the final Export() call never completes. There are no errors or messages, no return from the call; no CPU or memory or disk I/O is being utilized by the process. The process just seems to go into an infinite wait. There are no messages in the Windows Error Log and no messages in the ULS log.

Does anyone know what may be happening and how I might fix this? We are running a fairly early patch level of SharePoint 2010 if that enters into the discussion, but I don't want to just start patching a production system unless there is evidence of a fix that will help.

  • Can you create a new Document Set in your destination based on the source and only move the documents one by one? – Benny Skogberg Jul 21 '16 at 20:19
  • what account do you run the script with. Check the content database rights for this user. In some instances I found out that even though you add user as Shell Admin it is still a permissions problem. – ova Jul 21 '16 at 20:33
  • None of these are issues; I have used this same script to move hundreds of document sets from one document library to one other, both before and after this one that fails (and there are others that fail). There are no permission issues (running as the SharePoint Administrator) – Michael Frederick Jul 23 '16 at 3:43
  • OK, let me try changing my approach...How would I determine if there is a patch or fix for SharePoint 2010 that addresses this issue? – Michael Frederick Aug 2 '16 at 1:39
  • There's no one who knows anything about this issue? Seems hard to believe. – Michael Frederick Aug 11 '16 at 17:04
0

Though an old post, I wanted to add my findings using the same code as above with SharePoint 2013. Instead of nothing returning, I would get this error:

Exception calling "Export" with "0" argument(s): "Unable to determine identity of domain."

Interestingly, in the cases where this occurred, the document set contained a file larger than 10MB. When I removed the file from the document set, it exported successfully.

I don't know yet how this can be fixed, but at least I know what was causing it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.