Hi,
I am trying to get a count of topics within a root folder but excluding subfolders with certain words in their names.
I have tried the following but it is still returning folders named 'retired' and 'Archived'
$ishFolders = Get-IshFolder -IshSession $ishSession -FolderPath $ishFolder -FolderTypeFilter @("ISHModule") -Recurse | Where-Object -Property IshFolderType -EQ -Value ISHModule | Where-Object { $_fname -notlike "Retire" -and $_fname -notlike "Test" -and $_fname -notlike "Admin" -and $_fname -notlike "Archive" -and $_fname -notlike "do not use" } foreach ($ishFolder in $ishFolders) { Write-Host $ishFolder.fname foreach ($ishObject in (Get-IshFolderContent -IshSession $ishSession -IshFolder $ishFolder -MetadataFilter $metadataFilter | Get-IshDocumentObj)) { Write-Host $ishObject.IshRef ++$xmlTopicCount } } Write-Host ("Topic Count["+$xmlTopicCount+"]")
What am I doing wrong?
Any advice appreciated,
Regards,
Ann