Summary
Retrieves an existing email template contact.
Get-EmailTemplateContact
-Id
Returns an email template contact object.
Parameters
Parameter | Type | Required? | Notes |
---|---|---|---|
Id | Int32 | Yes | The email template contact id. |
Examples
Get an existing email template contact
This example retrieves a specific email template contact and outputs it as JSON.
# Retrieve a specific email template contact by id
$entity = Get-EmailTemplateContact -Id 1
Write-Output "Retrieved email template contact $($entity.ContactFullName) for email template $($entity.EmailTemplateId)"
# For debug purposes, convert the email template contact 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 email template contact some.distribution.group@nowhere.com for email template 1
JSON Results:
{
"EmailTemplateContactId": 1,
"EmailTemplateId": 1,
"EmailTemplate": {
"EmailTemplateId": 1,
// Removed email template fields for readability
},
"ContactId": 37,
"ContactFullName": "some.distribution.group@nowhere.com ",
"ContactEmailAddress": "some.distribution.group@nowhere.com",
"ContactNameAndEmailAddress": "some.distribution.group@nowhere.com <some.distribution.group@nowhere.com>",
"Contact": {
"ContactId": 37,
// Remove contact fields for readability
},
"RelationshipTypeId": 3,
"RelationshipTypeName": "CC",
"RelationshipType": null
}