API Reference

Cmdlet

Set-OfficeExcelWriteReservation

Aliases: ExcelWriteReservationSet
Namespace PSWriteOffice
Aliases
ExcelWriteReservationSet
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Object

Sets workbook write-reservation metadata.

Remarks

Sets workbook write-reservation metadata.

Examples

Authored help example

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: Context

Parameters

LegacyPasswordHash String optionalposition: namedpipeline: False
Optional precomputed legacy write-reservation hash.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated write-reservation metadata.
Password String optionalposition: namedpipeline: False
Optional write-reservation password. This is legacy Excel metadata, not package encryption.
ReadOnlyRecommended SwitchParameter optionalposition: namedpipeline: False
Recommend opening the workbook as read-only.
UserName String optionalposition: namedpipeline: False
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: Path

Parameters

LegacyPasswordHash String optionalposition: namedpipeline: False
Optional precomputed legacy write-reservation hash.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated write-reservation metadata.
Password String optionalposition: namedpipeline: False
Optional write-reservation password. This is legacy Excel metadata, not package encryption.
Path String requiredposition: 0pipeline: Falsealiases: FilePath, FullName, InputPath
Workbook path to update.
ReadOnlyRecommended SwitchParameter optionalposition: namedpipeline: False
Recommend opening the workbook as read-only.
UserName String optionalposition: namedpipeline: False
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: Document

Parameters

Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Open workbook document to update.
LegacyPasswordHash String optionalposition: namedpipeline: False
Optional precomputed legacy write-reservation hash.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated write-reservation metadata.
Password String optionalposition: namedpipeline: False
Optional write-reservation password. This is legacy Excel metadata, not package encryption.
ReadOnlyRecommended SwitchParameter optionalposition: namedpipeline: False
Recommend opening the workbook as read-only.
UserName String optionalposition: namedpipeline: False
User name stored in the write-reservation metadata.

Outputs

System.Object