# Get-OfficeArchive

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

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.IO.FileInfo` `System.Management.Automation.PSObject`

**Outputs**

`OfficeIMO.Archives.ArchiveInspectionEntry` `OfficeIMO.Archives.ArchiveMemberVerification`

**Source**

[GetOfficeArchiveCommand.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Archive/GetOfficeArchiveCommand.cs#L21) 

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>]
```

[#](#method-get-officearchive-string-string-archiveinspectionoptions-int32-switchparameter-archiveformat)

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.

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Reliable Automation Patterns](/docs/pswriteoffice/automation-patterns/) Guide
  
  Structure document jobs for repeatability, diagnostics, safe mutation, and CI artifacts. Includes examples and cmdlet links.
- [PSWriteOffice Command Families](/docs/pswriteoffice/command-families/) Guide
  
  The generated map of all exported cmdlets and the conceptual guide for each family. Includes PowerShell examples, validation notes, and cmdlet links.

## Examples

### Inspect a ZIP and verify one source ordinal.

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

### Verify an ordered split ZIP.

```powershell
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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:3FBD072D040A46FB790FCE90A01E47A1F2168D16F5EABEC4B64B2DBFF9B4AAD5 -->
