Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeArchive

Module
PSWriteOffice
Inputs
System.IO.FileInfo System.Management.Automation.PSObject
Outputs
OfficeIMO.Archives.ArchiveInspectionEntry OfficeIMO.Archives.ArchiveMemberVerification

Lists archive members or runs the available integrity checks on their payloads.

Syntax

Get-OfficeArchive
[-AdditionalVolume <String[]>]
[-LiteralPath] <String>
[-Options <ArchiveInspectionOptions>]
[-Ordinal <Int32[]>]
[-Verify]
[-VolumeFormat <Zip|SevenZip|Cab|RarLegacy|Rar5>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Inventory preserves source order and does not extract files. With -Verify, the result reports the checks that passed and any unsupported or unreadable members. Supply additional volumes in their original order.

Pipe FileInfo objects from Get-Item or objects with a LiteralPath, FullName, or PSPath property to inspect their archives.

Examples

Inspect a ZIP and verify one source ordinal.

Get-OfficeArchive -LiteralPath ./documents.zip
Get-OfficeArchive -LiteralPath ./documents.zip -Verify -Ordinal 0

Verify an ordered split ZIP.

Get-OfficeArchive -LiteralPath ./documents.z01 -AdditionalVolume ./documents.z02,./documents.zip -VolumeFormat Zip -Verify

Parameters

-AdditionalVolume String[] optional
Additional volume paths in archive order. Multiple paths default to RAR5 when VolumeFormat is omitted.
-LiteralPath String requiredposition: 0pipeline: True (ByPropertyName)aliases: FullName, PSPath
Literal path to the archive or its first volume. Binds from the pipeline by property name, including FullName and PSPath.
-Options ArchiveInspectionOptions optional
Finite inspection limits, optional ZIP and 7z passwords, and opt-in passive prefix limits.
-Ordinal Int32[] optional
Distinct source ordinals from zero through the inventory count minus one, in requested order. Requires -Verify. Omit to verify every member. A repeated or out-of-range ordinal rejects the entire selection.
-Verify SwitchParameter optional
Read each selected readable payload in full and run the available integrity checks. Use -Ordinal to limit the selection. Inspect IntegrityChecks on each result for the checks that passed. For a plain TAR, Status can be Verified with only Structure checks.
-VolumeFormat ArchiveFormat optional
Container format for explicitly supplied volumes. Omit for automatic detection of a single archive.
Possible values: Zip, SevenZip, Cab, RarLegacy, Rar5

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.