--- title: "Get-TaskComment" slug: "scripting-get-taskcomment" tags: ["Enterprise Only"] updated: 2025-07-16T20:05:48Z published: 2025-07-16T20:05:48Z canonical: "help.agilityblue.com/scripting-get-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. # Get-TaskComment ## Summary Retrieves an existing task comment. ```powershell Get-TaskComment -Id -IncludeTask ``` Returns a [task comment](https://apidocs.agilityblue.com/#6f268fc7-d313-4ea0-bb74-4e726bc176b7) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Id | Int32 | Yes | The task comment id. | | IncludeTask | Switch | No, Defaults to `false` | Includes the parent task property. | ## Examples ### Get an existing task comment This example retrieves a specific task comment and outputs it as JSON. ```powershell # Retrieve a specific task comment by id $data = Get-TaskComment -Id 5 Write-Output "Retrieved task comment $($data.TaskCommentId)" # 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 task comment 5 JSON Results: { "Metadata": null, "Task": null, "CreatedBy": null, "ChildComments": [], "TaskCommentId": 5, "TaskId": 8, "TaskName": "Process Data", "RelatedTaskCommentId": null, "Value": "
I began to upload this data this morning.
Notice: Windows says it will take about 3 hours to finish copying
", "CommentTypeId": 1, "CommentTypeName": "General", "IsBlocking": false, "IsQCRelated": false, "IsExternal": false, "CreatedByFullName": "Max Miller", "CreatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c", "CreatedOn": "2015-09-09T10:35:11.9798302-05:00", "LastUpdatedByFullName": "Max Miller", "LastUpdatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c", "LastUpdatedOn": "2015-09-09T10:35:11.9798302-05:00", "LastUpdatedBy": null } ```