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?