--- title: "Get-Comment" slug: "scripting-get-comment" updated: 2026-01-20T20:26:01Z published: 2026-01-20T20:26:01Z canonical: "help.agilityblue.com/scripting-get-comment" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.agilityblue.com/llms.txt > Use this file to discover all available pages before exploring further. # Get-Comment > [!NOTE] > Not Task Comments > > These comments relate to non-task comments. Task comments have a dedicated object, found [here](/v1/docs/scripting-get-taskcomment). ## Summary Retrieves an existing comment. ```powershell Get-Comment -Id ``` Returns a comment object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Id | Int32 | Yes | The comment id. | ## Examples ### Get an existing comment This example retrieves a specific comment and outputs it as JSON. ```powershell # Retrieve a specific comment by id $data = Get-Comment -Id 1 Write-Output "Retrieved comment $($data.CommentId)" # Convert the data to output as JSON $jsonOutput = $data | ConvertTo-Json -Depth 10 # For debug purposes, convert the data to output as JSON so we can see all the fields Write-Output "" Write-Output "JSON Results:" $jsonOutput = $data | ConvertTo-Json -Depth 10 Write-Output $jsonOutput ``` Results of executing the script: ```json Retrieved comment 1 JSON Results: { "Metadata": null, "Object": null, "CreatedBy": null, "ChildComments": [], "CommentId": 1, "ObjectId": 2, "ObjectName": "Matter", "PrimaryKeyId": 6, "RelatedCommentId": null, "Value": "
Contract officially closed on 1/1/2024.
We can begin collecting and processing data mid January.
", "CreatedByFullName": "Max Miller, "CreatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c", "CreatedOn": "2024-03-04T14:40:06.3923796+00:00", "LastUpdatedByFullName": "Max Miller", "LastUpdatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c", "LastUpdatedOn": "2024-03-04T14:40:06.3923796+00:00", "LastUpdatedBy": null } ```