--- title: "Get-Task" slug: "get-task" updated: 2025-07-16T12:19:32Z published: 2025-07-16T12:19:32Z canonical: "help.agilityblue.com/get-task" --- > ## 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-Task ## Summary Retrieves an existing task. ```powershell Get-Task    -Id    -IncludeForms    -IncludeProject ``` Returns a [task](https://apidocs.agilityblue.com/#7188f9cc-69d1-4f96-818f-bb8b2d08e739) object. > [!NOTE] > Additional Details > > Check out the [Concepts: Tasks & Task Forms](/v1/docs/scripting-tutorials-tasks-and-task-forms) article for more detailed information about tasks. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Id | Int32 | Yes | The task id. | | IncludeForms | Switch | No, Defaults to `false` | Adds the child `Forms` collection property to the output. | | IncludeProject | Switch | No, Defaults to `false` | Adds the parent `Project` property to the output. | ## Examples ### Get an existing task with forms This example retrieves a specific task, including form data, and outputs it as JSON. ```powershell # Retrieve a specific task by id while also including the task forms that belong to the task $task = Get-Task -Id 564 -IncludeForms Write-Output "Retrieved task $($task.TaskId)" # Convert the task to output as JSON $jsonOutput = $task | ConvertTo-Json -Depth 10 # For debug purposes, convert the task to output as JSON so we can see the available fields Write-Output "" Write-Output "JSON Results:" $jsonOutput = $task | ConvertTo-Json -Depth 10 # Output the task Write-Output $jsonOutput ``` Execution results: ```json Retrieved task 564 JSON Results: {  "Metadata": null,  "AssignedBy": null,  "AssignedTo": null,  "Client": null,  "CompletedBy": null,  "CreatedBy": null,  "Forms": [    {      "TaskFormId": 603,      "TaskId": 564,      "FormId": 1,      "Guid": 1534504252893,      "Name": "General Instructions",      "Sections": [        {          "TaskFormSectionId": 749,          "FormSectionId": null,          "TaskFormId": 603,          "Heading": null,          "Position": 0,          "Guid": 1,          "Fields": [            {              "TaskFormFieldId": 2568,              "FieldId": 1,              "TaskFormSectionId": 749,              "DataTypeId": 2,              "DataTypeName": "Rich Text",              "Label": "Instructions",              "ValueAsString": "We will need to start the next production round this week. We are awaiting more detailed production instructions from client regarding production specifications.",              "ValueAsBoolean": null,              "ValueAsNumber": null,              "ValueAsDecimal": null,              "ValueAsDate": null,              "DefaultValue": null,              "IsRequired": true,              "IsVisible": true,              "Position": 0,              "Guid": 1,              "ReferenceObject": null,              "AppliedProperties": []            }          ]        }      ]    },    {      "TaskFormId": 679,      "TaskId": 564,      "FormId": 39,      "Guid": 1548154817080,      "Name": "Production",      "Sections": [        {          "TaskFormSectionId": 829,          "FormSectionId": null,          "TaskFormId": 679,          "Heading": "Production Instructions",          "Position": 0,          "Guid": 1492715423321,          "Fields": [            {              "TaskFormFieldId": 2987,              "FieldId": 151,              "TaskFormSectionId": 829,              "DataTypeId": 1,              "DataTypeName": "Basic Text",              "Label": "Data to Produce",              "ValueAsString": "Saved Search",              "ValueAsBoolean": null,              "ValueAsNumber": null,              "ValueAsDecimal": null,              "ValueAsDate": null,              "DefaultValue": null,              "IsRequired": true,              "IsVisible": true,              "Position": 0,              "Guid": 1492715477785,              "ReferenceObject": null,              "AppliedProperties": []            },            {              "TaskFormFieldId": 2988,              "FieldId": 152,              "TaskFormSectionId": 829,              "DataTypeId": 1,              "DataTypeName": "Basic Text",              "Label": "Beginning Production Number",              "ValueAsString": "Next Available",              "ValueAsBoolean": null,              "ValueAsNumber": null,              "ValueAsDecimal": null,              "ValueAsDate": null,              "DefaultValue": "Next Available",              "IsRequired": true,              "IsVisible": true,              "Position": 1,              "Guid": 1492715488891,              "ReferenceObject": null,              "AppliedProperties": []            },            {              "TaskFormFieldId": 2989,              "FieldId": 153,              "TaskFormSectionId": 829,              "DataTypeId": 8,              "DataTypeName": "Single Choice",              "Label": "Confidentiality Designation",              "ValueAsString": "All \"Highly Confidential\"",              "ValueAsBoolean": null,              "ValueAsNumber": null,              "ValueAsDecimal": null,              "ValueAsDate": null,              "DefaultValue": "Endorse per coding\nAll \"Confidential\"\nAll \"Highly Confidential\"\nNone (all public)\nOther",              "IsRequired": true,              "IsVisible": true,              "Position": 2,              "Guid": 1492715505772,              "ReferenceObject": null,              "AppliedProperties": []            },            {              "TaskFormFieldId": 2990,              "FieldId": 154,              "TaskFormSectionId": 829,              "DataTypeId": 8,              "DataTypeName": "Single Choice",              "Label": "Production Format",              "ValueAsString": "See Matter-level ESI Protocol",              "ValueAsBoolean": null,              "ValueAsNumber": null,              "ValueAsDecimal": null,              "ValueAsDate": null,              "DefaultValue": "Follow Previous Production\nSee Matter-level ESI Protocol\nCustom ESI Protocol",              "IsRequired": true,              "IsVisible": true,              "Position": 3,              "Guid": 1492715553160,              "ReferenceObject": null,              "AppliedProperties": []            },            {              "TaskFormFieldId": 2991,              "FieldId": 208,              "TaskFormSectionId": 829,              "DataTypeId": 2,              "DataTypeName": "Rich Text",              "Label": "Custom ESI Protocol",              "ValueAsString": null,              "ValueAsBoolean": null,              "ValueAsNumber": null,              "ValueAsDecimal": null,              "ValueAsDate": null,              "DefaultValue": null,              "IsRequired": false,              "IsVisible": false,              "Position": 4,              "Guid": 1523801116503,              "ReferenceObject": null,              "AppliedProperties": []            },            {              "TaskFormFieldId": 2992,              "FieldId": 155,              "TaskFormSectionId": 829,              "DataTypeId": 9,              "DataTypeName": "Multiple Choice",              "Label": "Deliverable",              "ValueAsString": "Flash/External Hard Drive",              "ValueAsBoolean": null,              "ValueAsNumber": null,              "ValueAsDecimal": null,              "ValueAsDate": null,              "DefaultValue": "CD/DVD\nFlash/External Hard Drive\nInternal FTP\nClient FTP\nOther",              "IsRequired": true,              "IsVisible": true,              "Position": 5,              "Guid": 1492715598409,              "ReferenceObject": null,              "AppliedProperties": []            },            {              "TaskFormFieldId": 2993,              "FieldId": 209,              "TaskFormSectionId": 829,              "DataTypeId": 10,              "DataTypeName": "Reference",              "Label": "Deliverable Recipient(s)",              "ValueAsString": null,              "ValueAsBoolean": null,              "ValueAsNumber": null,              "ValueAsDecimal": null,              "ValueAsDate": null,              "DefaultValue": null,              "IsRequired": false,              "IsVisible": true,              "Position": 6,              "Guid": 1523801082381,              "ReferenceObject": {                "TaskFormFieldReferenceObjectId": 43,                "TaskFormFieldId": 2993,                "ObjectId": 7,                "Object": null,                "KeyType": "Int32",                "DisplayFormat": "%Val%",                "IsSystemObject": true,                "Name": null,                "Values": [                  {                    "TaskFormFieldReferenceObjectValueId": 55,                    "TaskFormFieldReferenceObjectId": 43,                    "KeyAsString": null,                    "KeyAsInteger": 12,                    "KeyAsLong": null,                    "Value": "Adele Butler "                  }                ]              },              "AppliedProperties": []            },            {              "TaskFormFieldId": 2994,              "FieldId": 156,              "TaskFormSectionId": 829,              "DataTypeId": 2,              "DataTypeName": "Rich Text",              "Label": "Further Instructions",              "ValueAsString": "Other instructions...",              "ValueAsBoolean": null,              "ValueAsNumber": null,              "ValueAsDecimal": null,              "ValueAsDate": null,              "DefaultValue": null,              "IsRequired": false,              "IsVisible": true,              "Position": 7,              "Guid": 1492715640773,              "ReferenceObject": null,              "AppliedProperties": []            }          ]        }      ]    }  ],  "Matter": null,  "Project": null,  "QualityCheckPerformedBy": null,  "Subscribers": [],  "TaskId": 564,  "ProjectId": 2018080000005,  "ProjectTypeId": 1,  "ProjectTypeName": "Normal",  "ProjectTypeDescription": "The normal project type where task work is performed.",  "ProjectSourceTypeId": 1,  "ProjectSourceTypeName": "Not Specified",  "ProjectDescription": "AGM Production",  "ProjectComputedTags": "Email Request",  "ProjectRequesterId": 12,  "ProjectRequesterFirstName": "Adele",  "ProjectRequesterLastName": "Butler",  "ProjectRequesterFullName": "Adele Butler",  "ProjectRequesterEmail": "abutler@abdemo.com",  "MatterId": 39,  "MatterName": "AGM Widget Corp. vs. MGM Manufacturing Inc.",  "MatterReference": "1024-0002",  "ClientId": 29,  "ClientName": "AGM Widget Corporation",  "ClientReference": "1024",  "Name": "AGM Production",  "AssignedToId": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",  "AssignedToFullName": "Max Miller",  "AssignedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",  "AssignedByFullName": "Max Miller",  "EstimatedHours": null,  "ActualHours": null,  "StatusId": 4,  "StatusDescription": "Completed",  "QualityCheckStatusId": 1,  "QualityCheckStatusDescription": "Not Performed",  "QualityCheckPerformedById": null,  "QualityCheckPerformedByFullName": null,  "FormNames": "General Instructions; Production (SBS)",  "SortOrder": 0,  "DateDue": "2019-01-23T09:00:00-06:00",  "CompletedOn": "2019-02-08T11:58:59.0486282-06:00",  "CompletedById": "d8555513-3db6-451a-9af2-e5d45b57f031",  "CompletedByFullName": "Martha Dibble",  "AssignedOn": "2023-02-09T15:23:31.1415396+00:00",  "NumberOfComments": 0,  "NumberOfAttachments": 0,  "NumberOfMediaLogEntries": 0,  "NumberOfVolumes": 0,  "NumberOfBillingEntries": 0,  "NumberOfSubscribers": 0,  "NumberOfEmailMessages": 0,  "CreatedByFullName": "Martha Dibble",  "CreatedById": "d8555513-3db6-451a-9af2-e5d45b57f031",  "CreatedOn": "2018-08-17T11:10:52.8773396-05:00",  "LastUpdatedByFullName": "Service Account",  "LastUpdatedById": "410e109b-6ff5-4442-9670-cd5e3cd82a7f",  "LastUpdatedOn": "2023-02-09T15:23:31.1415396+00:00",  "LastUpdatedBy": null } ```