Cmdlet
Get-OfficeEmail
Reads a native EML, EMLX, MSG, or TNEF artifact with bounded diagnostics.
Syntax
Get-OfficeEmail [-AsResult] [-Options <EmailReaderOptions>] [-Path] <String> [-StoreOptions <EmailStoreReaderOptions>] [<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Read a message without retaining attachment payloads.
$options = New-OfficeEmailReaderOptions -ExcludeAttachmentContent -MaxAttachmentBytes 25MB
Get-OfficeEmail -Path .\Message.msg -Options $options -AsResultParameters
- -AsResult SwitchParameter
- Return the read result with diagnostics and consumed byte count.
- -Options EmailReaderOptions
- Optional format detection, compound-file, MIME, attachment, and size limits.
- -Path String
- Path to an EML, EMLX, MSG, TNEF, or winmail.dat file.
- -StoreOptions EmailStoreReaderOptions
- Optional Apple Mail EMLX envelope, metadata, attachment, and size limits.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.