0
votes

Needed to clean up a winmail.dat issue by adding a contact and setting a couple of parameters. All worked as shown, except the command to test that it worked.

Get-MailContact | Select [email protected] | Select -UseMapiRichTextFormat

What is the reason for this failure?

Select-Object : A parameter cannot be found that matches parameter name 'UseMapiRichTextFormat'. At line:1 char:62 + ... t 1 Select [email protected] 1 Select -UseMapiRichTextFormat + ---------------------- + CategoryInfo : InvalidArgument: (:) [Select-Object], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.SelectObjectCommand

1
What failure? You misunderstood the usage of Select-Objectuser6811411
@MrAdmin, do you mean this? Select -Property UseMapiRichTextFormatDaniel Manta

1 Answers

0
votes

I think what you actually need is this:

Get-MailContact | 
    Where-Object {$_.ExternalEmailAddress -eq '[email protected]'} | 
    Select-Object -Property UseMapiRichTextFormat

Where-Object limits the result set by comparing each contact's ExternalEmailAddress property and only including the objects that match in the output (which should only be one)

Select-Object limits the output object members to a subset of the original members