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
  • In the past, I have attempted to utilize the -FolderTypeFilter argument in the following way:

    Get-IshFolder -IShSession $ishSession -FolderPath "folder path>" is the command you need to use. -Recurse | Get-IshFolderLocation | Out-File | C:Scriptstext3.csv | "ISHPublication" | FolderTypeFilter @("ISHPublication") | ISHSession $ishSession | Out-File |

    slope game

    but am receiving error

    PS C:WINDOWSsystem32> Get-IshFolder: An error occurred while trying to find a parameter that matches the name 'FolderTypeFilter'. 

    emoji
Reply
  • In the past, I have attempted to utilize the -FolderTypeFilter argument in the following way:

    Get-IshFolder -IShSession $ishSession -FolderPath "folder path>" is the command you need to use. -Recurse | Get-IshFolderLocation | Out-File | C:Scriptstext3.csv | "ISHPublication" | FolderTypeFilter @("ISHPublication") | ISHSession $ishSession | Out-File |

    slope game

    but am receiving error

    PS C:WINDOWSsystem32> Get-IshFolder: An error occurred while trying to find a parameter that matches the name 'FolderTypeFilter'. 

    emoji
Children