API Reference
Cmdlet
Set-OfficeExcelWriteReservation
Sets workbook write-reservation metadata.
Remarks
Sets workbook write-reservation metadata.
Examples
Recommend read-only opening for a shared workbook.
PS>
Set-OfficeExcelWriteReservation -Path .\Report.xlsx -ReadOnlyRecommended -UserName 'Reporting Team' -PassThru |
Format-List ReadOnlyRecommended, UserName
Writes Excel file-sharing/write-reservation metadata without encrypting the file or protecting workbook structure.
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
Set-OfficeExcelWriteReservation [-LegacyPasswordHash <String>] [-PassThru] [-Password <String>] [-ReadOnlyRecommended] [-UserName <String>] [<CommonParameters>]#Parameter set:
ContextParameters
- LegacyPasswordHash String
- Optional precomputed legacy write-reservation hash.
- PassThru SwitchParameter
- Emit the updated write-reservation metadata.
- Password String
- Optional write-reservation password. This is legacy Excel metadata, not package encryption.
- ReadOnlyRecommended SwitchParameter
- Recommend opening the workbook as read-only.
- UserName String
- User name stored in the write-reservation metadata.
Outputs
System.Object
Set-OfficeExcelWriteReservation [-LegacyPasswordHash <String>] [-PassThru] [-Password <String>] -Path <String> [-ReadOnlyRecommended] [-UserName <String>] [<CommonParameters>]#Parameter set:
PathParameters
- LegacyPasswordHash String
- Optional precomputed legacy write-reservation hash.
- PassThru SwitchParameter
- Emit the updated write-reservation metadata.
- Password String
- Optional write-reservation password. This is legacy Excel metadata, not package encryption.
- Path String
- Workbook path to update.
- ReadOnlyRecommended SwitchParameter
- Recommend opening the workbook as read-only.
- UserName String
- User name stored in the write-reservation metadata.
Outputs
System.Object
Set-OfficeExcelWriteReservation -Document <ExcelDocument> [-LegacyPasswordHash <String>] [-PassThru] [-Password <String>] [-ReadOnlyRecommended] [-UserName <String>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document ExcelDocument
- Open workbook document to update.
- LegacyPasswordHash String
- Optional precomputed legacy write-reservation hash.
- PassThru SwitchParameter
- Emit the updated write-reservation metadata.
- Password String
- Optional write-reservation password. This is legacy Excel metadata, not package encryption.
- ReadOnlyRecommended SwitchParameter
- Recommend opening the workbook as read-only.
- UserName String
- User name stored in the write-reservation metadata.
Outputs
System.Object