--- title: "Set-TaskSubscriber" slug: "scripting-set-task-subscriber" updated: 2025-07-16T16:16:51Z published: 2025-07-16T16:16:51Z canonical: "help.agilityblue.com/scripting-set-task-subscriber" --- > ## 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-TaskSubscriber ## Summary Updates an existing task subscriber. ```powershell Set-TaskSubscriber    -Entry    -IncludeTask    -IncludeUser ``` Returns the updated task subscriber object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | Task susbcriber object | Yes | | | IncludeTask | Switch | No, defaults to `False` | Includes the `Task` property in the output. | | IncludeUser | Switch | No, defaults to `False` | Includes the `User` property in the output. | Examples Change the task a subscriber is subscribed to ```powershell # Retrieve a task subscriber $taskSubscriber = Get-TaskSubscriber -Id 308 # Change the task that the subcriber is subscribed to $taskSubscriber.TaskId = 1068 # Save changes $taskSubscriber = Set-TaskSubscriber -Entry $taskSubscriber # Convert the taskSubscriber to output as JSON $jsonOutput = $taskSubscriber | ConvertTo-Json -Depth 10 # For debug purposes, convert the taskSubscriber to output as JSON so we can see the fields returned back to us Write-Output "JSON Results:" # Output the JSON results Write-Output $jsonOutput ``` Execution results: ```json JSON Results: {  "TaskSubscriberId": 308,  "TaskId": 1068,  "TaskName": "Produce Documents",  "Task": null,  "UserId": "410e109b-6ff5-4442-9670-cd5e3cd82a7f",  "User": null,  "UserFullName": "Service Account",  "UserEmail": "service@sadiebluesoftware.com",  "UserNotificationsEnabled": false,  "UserIsTeamAccount": false,  "AdditionalInformation": null,  "CreatedByFullName": "Service Account",  "CreatedById": "410e109b-6ff5-4442-9670-cd5e3cd82a7f",  "CreatedOn": "2025-07-16T15:19:48.276851+00:00",  "CreatedBy": null } ```