--- title: "Add-TaskComment" slug: "scripting-add-taskcomment" updated: 2025-07-16T20:06:56Z published: 2025-07-16T20:06:56Z canonical: "help.agilityblue.com/scripting-add-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. # Add-TaskComment ## Summary Creates a new task comment. ```powershell Add-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 create as a new entry. | | IncludeTask | Switch | No, Defaults to `false` | Includes the parent task property. | ## Examples ### Create a new task comment ```powershell # Create a new task comment (general comment) # Provide the necessary fields to create the task comment # For `CommentTypeId`, provide one of the following: #   1: General #   2: Issue #   3: Question #   4: Cancel Task $entry = @{    TaskID          = 966    CommentTypeId   = 1    Value           = "QC completed without any issues." } # Create the comment. The created entry will be returned back. $data = Add-TaskComment -Entry $entry # Output some information to help indicate that the comment was created Write-Output "Task comment $($data.TaskCommentId) was created 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 created 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": false,  "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:06:40.3018202+00:00",  "LastUpdatedBy": null } ```