# New-OfficeEmailStoreReaderOptions

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

Project

PSWriteOffice

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

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Email.Store.EmailStoreReaderOptions`

**Source**

[NewOfficeEmailStoreReaderOptionsCommand.cs:16](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Email/NewOfficeEmailStoreReaderOptionsCommand.cs#L16) 

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>]
```

[#](#member-0be21adf99e04548593fe64f)

Parameter set: `All Parameter Sets`

## Examples

### Read an EMLX message without retaining attachment payloads.

```powershell
$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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:4BC2C6F49585335D5ACA3E0319768B4C00D9A58CC54B7C492C2578E809712D01 -->
