Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

New-OfficeEmailStoreReaderOptions

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Email.Store.EmailStoreReaderOptions

Creates bounded email-store reader settings without requiring .NET constructor syntax.

Syntax

New-OfficeEmailStoreReaderOptions
[-ExcludeAttachmentContent]
[-IncludeAssociatedItems]
[-IncludeOrphanedItems]
[-MaxArchiveDecodedBytes <Int64>]
[-MaxArchiveEntries <Int32>]
[-MaxArchiveEntryBytes <Int64>]
[-MaxAttachmentBytes <Int64>]
[-MaxAttachmentsPerItem <Int32>]
[-MaxBTreeDepth <Int32>]
[-MaxCachedBTreePages <Int32>]
[-MaxDecodedPropertyBytesPerItem <Int64>]
[-MaxDecodedTableBytes <Int64>]
[-MaxDirectoryDepth <Int32>]
[-MaxDirectoryFileCount <Int32>]
[-MaxFolderCount <Int32>]
[-MaxInputBytes <Int64>]
[-MaxItemCount <Int32>]
[-MaxMessageBytes <Int64>]
[-MaxNestedMessageDepth <Int32>]
[-MaxNodeCount <Int32>]
[-MaxPropertiesPerItem <Int32>]
[-MaxTotalAttachmentBytes <Int64>]
[-MaxXmlCharactersPerItem <Int64>]
[-PstPassword <String>]
[-PstPasswordEncoding <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Read an EMLX message without retaining attachment payloads.

$options = New-OfficeEmailStoreReaderOptions -ExcludeAttachmentContent -MaxAttachmentsPerItem 100
Get-OfficeEmail -Path .\Message.emlx -StoreOptions $options -AsResult

Parameters

-ExcludeAttachmentContent SwitchParameter optional
Do not retain decoded attachment payloads in memory.
-IncludeAssociatedItems SwitchParameter optional
Materialize folder-associated information items.
-IncludeOrphanedItems SwitchParameter optional
Recover item nodes absent from folder contents tables.
-MaxArchiveDecodedBytes Int64 optional
Maximum total decoded size declared by archive entries.
-MaxArchiveEntries Int32 optional
Maximum entries accepted from a compressed email-store archive.
-MaxArchiveEntryBytes Int64 optional
Maximum decoded size declared by one archive entry.
-MaxAttachmentBytes Int64 optional
Maximum decoded bytes in one attachment.
-MaxAttachmentsPerItem Int32 optional
Maximum attachments per item.
-MaxBTreeDepth Int32 optional
Maximum tree traversal depth.
-MaxCachedBTreePages Int32 optional
Maximum PST/OST B-tree pages retained by the cache.
-MaxDecodedPropertyBytesPerItem Int64 optional
Maximum decoded property bytes per item.
-MaxDecodedTableBytes Int64 optional
Maximum decoded bytes traversed from one PST/OST table data tree.
-MaxDirectoryDepth Int32 optional
Maximum directory depth traversed by mailbox-directory sessions.
-MaxDirectoryFileCount Int32 optional
Maximum EML, EMLX, and Maildir files indexed by one directory session.
-MaxFolderCount Int32 optional
Maximum folders materialized.
-MaxInputBytes Int64 optional
Maximum seekable source length.
-MaxItemCount Int32 optional
Maximum items materialized.
-MaxMessageBytes Int64 optional
Maximum RFC 5322/MIME message bytes accepted from one item.
-MaxNestedMessageDepth Int32 optional
Maximum embedded-message recursion depth.
-MaxNodeCount Int32 optional
Maximum NDB nodes and blocks visited.
-MaxPropertiesPerItem Int32 optional
Maximum MAPI properties decoded per item.
-MaxTotalAttachmentBytes Int64 optional
Maximum decoded attachment bytes across the read.
-MaxXmlCharactersPerItem Int64 optional
Maximum XML characters parsed from one archive item.
-PstPassword String optional
Password used to validate legacy protected PST files.
-PstPasswordEncoding String optional
Encoding name used for the legacy PST password checksum.

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.