Home Orchestrator

How to retrieve analyst comments from an incident using SCSM commands?

JansiJansi Member IT Monkey ✭

Hi Team,

I am working on an integration project which requires me to retrieve Incident details using SMLets. I am successful in retrieving other incident details except Analyst comments. There are two relationship class available.

  1. ActionLog
  2. CommentLog

Could anyone please throw some inputs on how to retrieve the analyst comment.

Any help is highly appreciated.




  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    Hi @Jansi

    Try this:

    $irClass = Get-SCSMClass -name System.WorkItem.Incident 

    $ir = Get-SCSMObject -Class $irClass -Filter "name -eq 'IR1097'" 

    $relationships = Get-SCSMRelationshipObject -BySource $ir | ?{$_.relationshipid -eq "835a64cd-7d41-10eb-e5e4-365ea2efc2ea"} ##comment log relationship class

    foreach ($rel in $relationships) {

      $rel.targetobject | select -ExpandProperty values


Sign In or Register to comment.