how to get all topics list in repository based folder ID?

Hi,

 

I am trying to write all the topics in a repository in a text file based on the root folder ID. Below is my code

 

Import-Module ISHRemote

# first authenticate

$ishSession = New-IshSession -IshPassword 'xxxx' -IshUserName 'xxxxx' -WsBaseUrl 'xxxxxsdlproducts.com/.../'

$folderId = 3222 #use correct folder id

$ishObjects = Get-IshFolderContent -IshSession $ishSession -FolderId $folderId | Out-File D:\objectlist.txt

 

This is not writing anything, anybody can help me what I am doing wrong here? 

Parents
  • Hi Roopesh,

    I guess you are trying to request folder content for a folder of the type 'ISHNone' which means that the folder can not contain any object.

    You can verify this by outputting the metadata returned by the Get-IshFolder call as shown below.

    $metadata = Get-IshFolder -IshSession $ishSession -FolderId $folderId

    The resulting object will show your ID and the type of the folder.

    ----- returned information from my reference environment -----
    PS C:\Users\rsnijders> $metadata

    ishtype ishref
    ------- ------
    ISHNone 3222
    ----- END OF returned information from my reference environment -----

    Only folders with a type different from 'ISHNone' might return values in the Get-IshFolderContent call.

    Kind Regards,

    Raf
Reply
  • Hi Roopesh,

    I guess you are trying to request folder content for a folder of the type 'ISHNone' which means that the folder can not contain any object.

    You can verify this by outputting the metadata returned by the Get-IshFolder call as shown below.

    $metadata = Get-IshFolder -IshSession $ishSession -FolderId $folderId

    The resulting object will show your ID and the type of the folder.

    ----- returned information from my reference environment -----
    PS C:\Users\rsnijders> $metadata

    ishtype ishref
    ------- ------
    ISHNone 3222
    ----- END OF returned information from my reference environment -----

    Only folders with a type different from 'ISHNone' might return values in the Get-IshFolderContent call.

    Kind Regards,

    Raf
Children