# New-OfficeEmailStoreReaderOptions

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

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Email.Store.EmailStoreReaderOptions`

**Source**

[NewOfficeEmailStoreReaderOptionsCommand.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Email/NewOfficeEmailStoreReaderOptionsCommand.cs#L18) 

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

## Syntax

```
New-OfficeEmailStoreReaderOptions
[-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>]
[-NoAttachmentContent]
[-Password <SecureString>]
[-PasswordEncoding <String>]
[<CommonParameters>]
```

[#](#member-2beb2a1a2a314d093e51e538)

Parameter set: `Options`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Open Formats and Text Automation](/docs/pswriteoffice/open-text-formats/) Guide
  
  Use the smaller PSWriteOffice families for text, interchange, open formats, and managed message workflows. Includes examples and cmdlet links.

## Examples

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

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

## Parameters

**-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.

**-NoAttachmentContent SwitchParameter optional**

Do not retain decoded attachment payloads in memory.

**-Password SecureString optional**

Password used to validate legacy protected PST files.

**-PasswordEncoding 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).

<!-- PowerForge markdown artifact sha256:D4808E9CB4B1FD87F963FD74F73E6595DF1CCE977DC076FB09B4FAB97533F410 -->
