--- title: "Set-Comment" slug: "scripting-set-comment" tags: ["Enterprise Only"] updated: 2026-01-20T20:26:39Z published: 2026-01-20T20:26:39Z canonical: "help.agilityblue.com/scripting-set-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. # Set-Comment > [!NOTE] > Not Task Comments > > These comments relate to non-task comments. Task comments have a dedicated object, found [here](/v1/docs/scripting-set-taskcomment). ## Summary Updates an existing comment. ```powershell Set-Comment    -Entry ``` Returns a comment object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | Comment Object | Yes | The contact object to update for an existing entry. | ## Examples ### Update an existing comment ```powershell # Update an existing comment # A common flow for updating existing data is to first retrieve the data using the GET # command, update specific fields, and then provide the modified data back to the SET command. $entry = Get-Comment -Id 3 # In this example, we want to update the comment value: $entry.Value = "Correction: This matter was opened up on 1/14/2024" # Update the comment. The updated entry will be returned back. $data = Set-Comment -Entry $entry # Output some information to help indicate that the comment was updated Write-Output "Comment $($data.CommentId) was updated on matter $($data.PrimaryKeyId)" # 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 # Output the data Write-Output $jsonOutput ``` ```json Comment 3 was updated on matter 6 JSON Results: {  "Metadata": null,  "Object": null,  "CreatedBy": null,  "ChildComments": [],  "CommentId": 3,  "ObjectId": 2,  "ObjectName": "Matter",  "PrimaryKeyId": 6,  "RelatedCommentId": null,  "Value": "Correction: This matter was opened up on 1/14/2024",  "CreatedByFullName": "Max Miller",  "CreatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "CreatedOn": "2024-03-04T15:00:06.1715883+00:00",  "LastUpdatedByFullName": "Max Miller",  "LastUpdatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "LastUpdatedOn": "2024-03-04T15:10:28.3143102+00:00",  "LastUpdatedBy": null } ```