Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Test-OfficeInvoice

Module PSWriteOffice
Inputs
OfficeIMO.Invoicing.Invoice System.String
Outputs
OfficeIMO.Invoicing.InvoiceModelValidationResult OfficeIMO.Invoicing.Validation.InvoiceValidationReport

Validates an invoice model or exact XML bytes against caller-supplied authority rules.

Syntax

Test-OfficeInvoice -Invoice <Invoice> [<CommonParameters>]
#
Parameter set: Model
Test-OfficeInvoice [-FacturXArchivePath <String>] [-JavaExecutable <String>] -Path <String> [-PeppolRulesPath <String>] -RulesArchivePath <String> [-SaxonJarPath <String>] [-SpecificationRelease <InvoiceSpecificationRelease>] [-TimeoutSeconds <Int32>] [<CommonParameters>]
#
Parameter set: File

Description

Model validation reports semantic completeness and arithmetic. File validation requires PowerShell 7.4 and local pinned rule archives; business rules require a caller-installed Saxon/Java runtime. Missing rule execution remains visible in the report.

Examples

Authored help example

Reports semantic completeness and arithmetic; this does not run external standards rules.

$invoice | Test-OfficeInvoice

Parameters

-Invoice Invoice requiredpipeline: True (ByValue)sets: Model
Editable invoice.
-FacturXArchivePath String optionalsets: File
Optional pinned Factur-X validation archive.
-JavaExecutable String optionalsets: File
Caller-installed Java executable used only when SaxonJarPath is supplied.
-Path String requiredpipeline: True (ByValue, ByPropertyName)aliases: FullName, LiteralPathsets: File
Exact invoice XML bytes to validate against pinned local authority rules. Requires PowerShell 7.4.
-PeppolRulesPath String optionalsets: File
Optional pinned Peppol Schematron file.
-RulesArchivePath String requiredsets: File
Pinned KoSIT rule archive. No rules are downloaded automatically.
-SaxonJarPath String optionalsets: File
Optional caller-installed Saxon HE JAR for business rules. Without it, business rules remain NotRun and IsValid is false.
-SpecificationRelease InvoiceSpecificationRelease optionalsets: File
Exact specification for file validation.
Possible values: En16931_1_3_16, FacturX_1_09_2_Zugferd_2_5_2, XRechnung_3_0_2_2026_08_31, PeppolBis_3_0_21
-TimeoutSeconds Int32 optionalsets: File
Maximum business-rule process duration in seconds.

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.