Cmdlet
Test-OfficeInvoice
Validates an invoice model or exact XML bytes against caller-supplied authority rules.
Syntax
Test-OfficeInvoice -Invoice <Invoice> [<CommonParameters>]#Parameter set:
ModelTest-OfficeInvoice [-FacturXArchivePath <String>] [-JavaExecutable <String>] -Path <String> [-PeppolRulesPath <String>] -RulesArchivePath <String> [-SaxonJarPath <String>] [-SpecificationRelease <InvoiceSpecificationRelease>] [-TimeoutSeconds <Int32>] [<CommonParameters>]#Parameter set:
FileDescription
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
Reports semantic completeness and arithmetic; this does not run external standards rules.
$invoice | Test-OfficeInvoiceParameters
- -Invoice Invoice
- Editable invoice.
- -FacturXArchivePath String
- Optional pinned Factur-X validation archive.
- -JavaExecutable String
- Caller-installed Java executable used only when SaxonJarPath is supplied.
- -Path String
- Exact invoice XML bytes to validate against pinned local authority rules. Requires PowerShell 7.4.
- -PeppolRulesPath String
- Optional pinned Peppol Schematron file.
- -RulesArchivePath String
- Pinned KoSIT rule archive. No rules are downloaded automatically.
- -SaxonJarPath String
- Optional caller-installed Saxon HE JAR for business rules. Without it, business rules remain NotRun and IsValid is false.
- -SpecificationRelease InvoiceSpecificationRelease
- 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
- 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.