Get-TaskSubscriber

Prev Next

Summary

Retrieves an existing task subscriber.

Get-TaskSubscriber
    -Id
    -IncludeTask
    -IncludeUser

Returns a task subscriber object.

Parameters

Parameter

Type

Required?

Notes

Id

Int32

Yes

The task subscriber id.

IncludeTask

Switch

No, defaults to False

Includes the Task property details.

IncludeUser

Switch

No, defaults to False

Includes User property details.

Examples

Get an existing task subscriber

This example retrieves a specific task subscriber and outputs it as JSON.

# Retrieve a specific task subscriber by id
$entity = Get-TaskSubscriber -Id 13

Write-Output "Retrieved task subscriber $($entity.TaskSubscriberId)"

# For debug purposes, convert the task to output as JSON so we can see the available fields
Write-Output ""
Write-Output "JSON Results:"

$jsonOutput = $entity | ConvertTo-Json -Depth 10

# Output the task
Write-Output $jsonOutput

Execution results:

Retrieved task subscriber 13

JSON Results:
{
  "TaskSubscriberId": 13,
  "TaskId": 517,
  "TaskName": "Load data",
  "Task": null,
  "UserId": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",
  "User": null,
  "UserFullName": "Max Miller",
  "UserEmail": "mmiller@agilityblue.com",
  "UserNotificationsEnabled": true,
  "UserIsTeamAccount": false,
  "AdditionalInformation": null,
  "CreatedByFullName": "Max Miller",
  "CreatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",
  "CreatedOn": "2019-03-11T14:46:11.5687565-05:00",
  "CreatedBy": null
}