API Reference
Cmdlet
Unprotect-OfficeExcelWorkbook
Removes workbook structure/window protection metadata.
Remarks
Removes workbook structure/window protection metadata.
Examples
Remove workbook-level protection metadata.
PS>
Unprotect-OfficeExcelWorkbook -Path .\Report.xlsx
Test-OfficeExcelWorkbook -Path .\Report.xlsx -SkipOpenXmlValidation |
Select-Object Passed, ProtectionSummary
Removes workbook structure/window protection metadata and saves the workbook.
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.
Syntax
Unprotect-OfficeExcelWorkbook [-PassThru] [<CommonParameters>]#Parameter set:
ContextParameters
- PassThru SwitchParameter
- Emit the workbook after removing protection.
Outputs
OfficeIMO.Excel.ExcelDocument System.IO.FileInfo
Unprotect-OfficeExcelWorkbook -InputPath <String> [-PassThru] [<CommonParameters>]#Parameter set:
PathParameters
- InputPath String
- Workbook path to update.
- PassThru SwitchParameter
- Emit the workbook after removing protection.
Outputs
OfficeIMO.Excel.ExcelDocument System.IO.FileInfo
Unprotect-OfficeExcelWorkbook -Document <ExcelDocument> [-PassThru] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document ExcelDocument
- Workbook to update outside the DSL context.
- PassThru SwitchParameter
- Emit the workbook after removing protection.
Outputs
OfficeIMO.Excel.ExcelDocument System.IO.FileInfo