--- title: "Set-TaskComment" slug: "scripting-set-taskcomment" updated: 2025-07-16T20:07:37Z published: 2025-07-16T20:07:37Z canonical: "help.agilityblue.com/scripting-set-taskcomment" --- > ## 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-TaskComment ## Summary Updates an existing task comment. ```powershell Set-TaskComment    -Entry    -IncludeTask ``` Returns a [task comment](https://apidocs.agilityblue.com/#6f268fc7-d313-4ea0-bb74-4e726bc176b7) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | [Task Comment](https://apidocs.agilityblue.com/#6f268fc7-d313-4ea0-bb74-4e726bc176b7) Object | Yes | The task comment object to update for an existing entry. | | IncludeTask | Switch | No, Defaults to `false` | Includes the parent task property. | ## Examples ### Update an existing task comment ```powershell # Update an existing task 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-TaskComment -Id 935 # In this example, we want to update the "IsQCRelated" property to true: $entry.IsQCRelated = $true # Update the task comment. The updated entry will be returned back. $data = Set-TaskComment -Entry $entry # Output some information to help indicate that the comment was updated Write-Output "Task Comment $($data.TaskCommentId) was updated on task $($data.TaskId)" # 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 ``` Results of executing the script: ```json Task Comment 935 was updated on task 966 JSON Results: {  "Metadata": null,  "Task": null,  "CreatedBy": null,  "ChildComments": [],  "TaskCommentId": 935,  "TaskId": 966,  "TaskName": "Processing QC",  "RelatedTaskCommentId": null,  "Value": "QC completed without any issues.",  "CommentTypeId": 1,  "CommentTypeName": "General",  "IsBlocking": false,  "IsQCRelated": true,  "IsExternal": false,  "CreatedByFullName": "Max Miller",  "CreatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "CreatedOn": "2024-03-04T20:06:40.3018202+00:00",  "LastUpdatedByFullName": "Max Miller",  "LastUpdatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "LastUpdatedOn": "2024-03-04T20:14:16.6756302+00:00",  "LastUpdatedBy": null } ```