Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeDocumentDetection

Module PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.Reader.ReaderDetectionResult

Detects a document kind from extension and bounded content evidence.

Syntax

Get-OfficeDocumentDetection [-MaxContainerEntries <Int32>] [-MaxProbeBytes <Int32>] [-Mode <ExtensionOnly|ContentWhenUnknown|PreferContent>] [-NoContainerInspection] [-Path] <String> [-Reader <OfficeDocumentReader>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Authored help example

Inspect the real content type of a document.

Get-OfficeDocumentDetection -Path .\upload.bin -Mode PreferContent

Returns the selected kind, confidence, media type, and evidence used by OfficeIMO.Reader.

Parameters

-MaxContainerEntries Int32 optional
Maximum archive entries inspected while classifying container formats.
-MaxProbeBytes Int32 optional
Maximum prefix bytes inspected for signatures and text markers.
-Mode ReaderDetectionMode optional
Policy used to combine extension and content evidence.
Possible values: ExtensionOnly, ContentWhenUnknown, PreferContent
-NoContainerInspection SwitchParameter optional
Skip structural inspection of ZIP-based containers.
-Path String requiredposition: 0pipeline: True (ByValue)
Path to inspect.
-Reader OfficeDocumentReader optional
Optional immutable OfficeIMO reader with caller-configured handlers and processors.

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.