Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeDocumentInfo

Module
PSWriteOffice
Inputs
System.Object System.String[]
Outputs
OfficeIMO.OfficeDocumentInfo

Inspects format, native counts and encryption without changing a source or reopening a live document.

Syntax

Get-OfficeDocumentInfo
[-Detailed]
[-DetectionMode <ExtensionOnly|ContentWhenUnknown|PreferContent>]
[-MaximumContainerEntries <Int32>]
[-MaximumProbeBytes <Int32>]
[-NoContainerInspection]
[-Options <Object[]>]
[-Password <SecureString>]
[-Path] <String[]>
[-Reader <OfficeDocumentReader>]
[-ThrottleLimit <Int32>]
[<CommonParameters>]
#
Parameter set: Path
Get-OfficeDocumentInfo
[-Detailed]
[-Document] <Object>
[-Options <Object[]>]
[<CommonParameters>]
#
Parameter set: Document
Get-OfficeDocumentInfo
[-Detailed]
[-DetectionMode <ExtensionOnly|ContentWhenUnknown|PreferContent>]
-LiteralPath <String[]>
[-MaximumContainerEntries <Int32>]
[-MaximumProbeBytes <Int32>]
[-NoContainerInspection]
[-Options <Object[]>]
[-Password <SecureString>]
[-Reader <OfficeDocumentReader>]
[-ThrottleLimit <Int32>]
[<CommonParameters>]
#
Parameter set: LiteralPath

Examples

Inventory workbook counts and protection.

Get-ChildItem ./Reports/*.xlsx | Get-OfficeDocumentInfo | Select-Object Path, Format, SheetCount, IsEncrypted

Inspect unsaved presentation edits.

$presentation | Get-OfficeDocumentInfo -Detailed

Parameters

-Detailed SwitchParameter optional
Include the native format's detached inspection snapshot.
-DetectionMode ReaderDetectionMode optionalsets: Path, LiteralPath
Content and filename selection policy.
Possible values: ExtensionOnly, ContentWhenUnknown, PreferContent
-MaximumContainerEntries Int32 optionalsets: Path, LiteralPath
Maximum container entries examined during format detection.
-MaximumProbeBytes Int32 optionalsets: Path, LiteralPath
Maximum prefix bytes examined for content signatures.
-NoContainerInspection SwitchParameter optionalsets: Path, LiteralPath
Skip structural container inspection when identifying the format.
-Options Object[] optional
Inspection, native format or Reader policy objects; hashtables are accepted.
-Password SecureString optionalsets: Path, LiteralPath
Password used locally to open an encrypted source.
-Path String[] requiredposition: 0pipeline: True (ByValue)sets: Path
Gets or sets input paths with provider wildcard expansion.
-Reader OfficeDocumentReader optionalsets: Path, LiteralPath
Immutable caller-configured format registry.
-ThrottleLimit Int32 optionalsets: Path, LiteralPath
Gets or sets the maximum number of concurrent background operations.
-Document Object requiredposition: 0pipeline: True (ByValue)sets: Document
Live native model or normalized Reader result. Its source path is never reopened.
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Gets or sets input paths without wildcard expansion, binding FileInfo.FullName and provider PSPath.

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.