Get-EmailMessageContact
- 1 Minute to read
- Print
- DarkLight
- PDF
Get-EmailMessageContact
- 1 Minute to read
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Summary
Retrieves an existing email message contact.
Get-EmailMessageContact
-Id
Returns an email message contact object.
Parameters
Parameter | Type | Required? | Notes |
---|---|---|---|
Id | Int32 | Yes | The email message contact id. |
Examples
Get an existing email message contact
This example retrieves a specific email message contact and outputs it as JSON.
# Retrieve a specific email message contact by id
$emailMessageContact = Get-EmailMessageContact -Id 1
Write-Output "Retrieved email message contact $($emailMessageContact.EmailMessageContactId)"
# Convert the email message contact to output as JSON
$jsonOutput = $emailMessageContact | ConvertTo-Json -Depth 10
# For debug purposes, convert the emailMessageContact to output as JSON so we can see the available fields
Write-Output ""
Write-Output "JSON Results:"
$jsonOutput = $emailMessageContact | ConvertTo-Json -Depth 10
# Output the email message contact
Write-Output $jsonOutput
Execution results:
Retrieved email message contact 1
JSON results:
{
"EmailMessageContactId": 1,
"EmailMessageId": 1,
"EmailMessage": {
// Email message fields removed
},
"ContactId": 1,
"ContactFullName": "Max Miller",
"ContactEmailAddress": "mmiller@agilityblue.com",
"ContactNameAndEmailAddress": "Max Miller <mmiller@agilityblue.com>",
"Contact": {
// Contact fields removed
},
"RelationshipTypeId": 1,
"RelationshipTypeName": "To",
"RelationshipType": null
}