Getting contents of a publication

I'm trying to read the contents of a publication file. Here's my attempt:

$ishSession = New-IshSession -WsBaseUrl xxx.sdlproducts.com/.../ -ishUserName xxx -ishPassword "xxxx"

$ishSession.DefaultRequestedMetadata = 'All';

$pfolder = Get-IshFolder -FolderPath "\General\_Global\_Resource Library\Tools\Cross Reference Tool\Publications"
$pobjects = Get-IshFolderContent -ishfolder $pfolder
foreach ($pobject in $pobjects)
{
    $pub = Get-IshDocumentObjData -ishobject $pobject -FolderPath "C:\tmp" -Debug
}

$pobject is of type ISHPublication, but Get-IshDocumentObjData generates the following:

Get-IshDocumentObjData : Buffer cannot be null.
Parameter name: array
At line:15 char:12
+ $pub = Get-IshDocumentObjData -ishobject $pobject -FolderPath "C: ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-IshDocumentObjData], ArgumentNullException
+ FullyQualifiedErrorId : GetIshDocumentObjData,Trisoft.ISHRemote.Cmdlets.DocumentObj.GetIshDocumentObjData

Parents Reply Children
No Data