Commands › Exchange Online

New-SearchDocumentFormat

Exchange Online ExchangeOnlineManagement New-*

Add a format-specific filter to those used by Exchange search.

Quick start script

# New-SearchDocumentFormat — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SearchDocumentFormat
$before | Format-List

# 3. Make the change (dry run first)
New-SearchDocumentFormat -Identity <SearchDocumentFormatId> -Extension <String> -MimeType <String> -WhatIf
New-SearchDocumentFormat -Identity <SearchDocumentFormatId> -Extension <String> -MimeType <String>

# 4. Verify and diff
$after = Get-SearchDocumentFormat
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

New-SearchDocumentFormat [-Identity] <SearchDocumentFormatId> -Extension <String> -MimeType <String> -Name <String>
 [-Confirm]
 [-Enabled <Boolean>]
 [-Server <ServerIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (8)

ParameterTypeRequiredWhat it controls
-Identity SearchDocumentFormatId yes The Identity parameter uniquely identifies the new search document format. For example, an identity of "PropSCT" might specify a proprietary document format which is supported by a custom IFilter. The Identity...
-Extension String yes The Extension parameter specifies the file type to be processed by the filter and is designated by the common file extension associated with the file type. Examples include .MP3, .JPG and .PNG. Note the leading period.
-MimeType String yes The MimeType parameter specifies the MIME type of the format.
-Name String yes The Name specifies a friendly name for the format, but does not need to be unique. For example, you might have several different formats (supported by custom IFilters) that are used to index output from a proprietary...
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-Enabled Boolean The Enabled parameter specifies whether the new format is enabled at creation.
-Server ServerIdParameter The Server parameter specifies the Exchange server where you want to run this command. You can use any value that uniquely identifies the server. For example:
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.