How to get a count of all topics in our Tridion Docs repo

Hi,

What is the most straightforward way to get a count of all topics in our Tridion Docs repo?

I am assuming I can do so with ISHRemote but not sure how to approach the script.

Any feedback appreciated,

Regards,

Ann

emoji
Parents Reply Children
  • You can also search by date using IshRemote which avoids searching the whole repository at once. Borrowing some of Dave's code, the following will count objects created during December 2023 a day at a time. If you know when the earliest objects were created you can start there and work forward to today. Still takes a while but I've found it avoids issues with folder searches where they run for ages and then crash without telling you exactly why or where.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    $imageCount=0
    $xmlCount=0
    $endDate = [datetime]::parse("31/12/2023")
    $startDate = [datetime]::parse("01/12/2023")
    for($i = $startDate; $i -le $endDate; $i = $i.AddDays(1))
    {
    $searchDate=$i.ToString("d/MM/yyyy")
    write $searchDate
    $metafilter = Set-IshMetadataFilterField -Level Logical -Name CREATED-ON -FilterOperator Equal -Value $searchDate
    $Objs=Find-IshDocumentObj -MetadataFilter $metafilter |
    ForEach-Object -Process {
    if ($_.IshType -in @("ISHIllustration")) { ++$imageCount }
    if ($_.IshType -in @("ISHModule", "ISHMasterDoc", "ISHLibrary")) { ++$xmlCount }
    }
    }
    Write-Host ("imageCount["+$imageCount+"]")
    Write-Host ("xmlCount["+$xmlCount+"]")
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    emoji
  • Thanks for that Barra, I have it running now.

    Regards,

    Ann

    emoji