Hi
How do I get a list of publications (not publicationOutput)?
Each publication should be listed once, even if it has been published with three different output types
Thanks!
Hi
How do I get a list of publications (not publicationOutput)?
Each publication should be listed once, even if it has been published with three different output types
Thanks!
Hi Milly,
If you use the Find-ISHPublicationOutput you will get the list of publications for all available PublicationOutputs. You will need to make the distinct from the list yourself
Alternative approach would be to use the API wrapper which is also supported through ISHRemote.
eg.
$mySession.PublicationOutput25.Find("ISHNoStatusFilter", "", "<ishfields><ishfield name='FTITLE' level='logical'/></ishfields>")
where $mySession is your session object returned by the New-ISHSession command used to authenticate to SDL Tridion Docs.
This sample will return the distinct list of logical level publication objects only.
Kind Regards,
Raf
Besides Raf suggestion, there are two other routes...
The first being to export to Excel and do your action there. The https://github.com/dfinke/ImportExcel module is very handy for that. So with that PowerShell module installed, your command would look:
Find-IshPublicationOutput | Export-Excel
To stay within PowerShell, I would use:
Find-IshPublicationOutput | Sort-Object -Property IshRef,version_version_value -Unique
Thanks, Raf. It works like a charm. I assume I can modify the command to retrieve FISHMASTERREF as well.
Hi Milly,
Yes you can modify the command to retrieve any property you like, as long as you use the correct name/level combinations.
So for FISHMASTERREF this would be changed into:
<ishfields><ishfield name='FISHMASTERREF' level='version'/></ishfields>
or the combined retrieval:
<ishfields><ishfield name='FTITLE' level='logical'/><ishfield name='FISHMASTERREF' level='version'/></ishfields>