Hi All,
It has been a little while, i have been quite involved with an Integration Project. With this project there was a requirement to add comments to a Work Item. The information is passed on from “System A” to “System B” via XML. Using PowerShell, extracting the XML contents is not too difficult, if anyone would like to dive into that a little bit, please let me know with Comments.
I decided not to re-invent the wheel, so some searching was in order, and I found the following post, this post gave the basics. However every time I tried to add additional comments, the comments were over-written and NOT replaced. Not quite the desired effect. So after some more checking and research and tinkering within the Service Manager, I discovered the following about comments.
When adding a Comment, there is adding of a relationship class, already mentioned in this post, however it also uses a GUID.
Image may be NSFW.
Clik here to view.
There is also another trick to adding comments within Orchestrator, this is discovered by trying to add a comment and then pulling all the available fields and looking at them. It is a small component which can be easily missed. The “Display Name” must also be the same GUID. So you might be asking how do we get the GUID?
Well, PowerShell can easily handle this for you.
$guid = [System.Guid]::NewGuid().ToString()
You simply use this a pre-cursor step and publish this data from “Run .Net Script”, so a sample would look like this.
Image may be NSFW.
Clik here to view.
Get-Object Properties
I pass on the ID Value I want to modify from another Runbook
Image may be NSFW.
Clik here to view.
Create Related Object Properties
I use an “Extended” class of comments needed for this project, principal remains the same.
Image may be NSFW.
Clik here to view.
I hope this saves you some time and add some value.
Image may be NSFW.
Clik here to view.
Follow me,
Image may be NSFW.
Clik here to view.Twitter (Personal & System Centre)
Image may be NSFW.
Clik here to view. Twitter (System Centre Focused)
Filed under: Orchestrator, Service Manager, System Center Tagged: Integration Project, Orchestrator, Powershell, SCSM, Service Manager Image may be NSFW.
Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.
