Cmdlet
Repair-OfficeDocument
Runs native workbook repairs in place, into a copy, or on a caller-owned model.
Syntax
Repair-OfficeDocument
[-Options <Object[]>]
[-OutputPath <String>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[<CommonParameters>]#Parameter set:
PathRepair-OfficeDocument
-LiteralPath <String[]>
[-Options <Object[]>]
[-OutputPath <String>]
[-PassThru]
[-Password <SecureString>]
[<CommonParameters>]#Parameter set:
LiteralPathRepair-OfficeDocument
[-Document] <Object>
[-Options <Object[]>]
[-OutputPath <String>]
[-PassThru]
[<CommonParameters>]#Parameter set:
DocumentExamples
Example 1
Repair-OfficeDocument -Path @('C:\Path')Example 2
Repair-OfficeDocument -Document 'Value'Example 3
Repair-OfficeDocument -LiteralPath @('C:\Path')Parameters
- -Options Object[]
- Native format repair settings and property overrides.
- -OutputPath String
- Write one repaired copy; file inputs otherwise save in place.
- -PassThru SwitchParameter
- Emit native repair findings and publication details.
- -Password SecureString
- Password used to open an encrypted file.
- -Path String[]
- Input paths; supports wildcards.
- -LiteralPath String[]
- Exact input paths.
- -Document Object
- Caller-owned native document to repair without taking ownership.
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.
Outputs
PSWriteOffice.Models.OfficeRepairReport: Native workbook repair findings and the destination actually published by Repair-OfficeDocument.