Cmdlet
New-OfficeExcelProtectionOptions
Creates Excel-specific hash and reservation settings for Protect-OfficeDocument.
Syntax
New-OfficeExcelProtectionOptions
[-LegacyPasswordHash <String>]
[-ModifyPasswordHash <String>]
[-ReservedBy <String>]
[<CommonParameters>]#Parameter set:
DefaultExamples
Set the name displayed by Excel for a protected write reservation.
$options = New-OfficeExcelProtectionOptions -ReservedBy 'Finance team'
Protect-OfficeDocument -Path ./Budget.xlsx -Restriction ReadOnlyRecommended -Options $options -OutputPath ./Budget-review.xlsxParameters
- -LegacyPasswordHash String
- Precomputed native workbook protection hash, with at most four hexadecimal digits.
- -ModifyPasswordHash String
- Precomputed native write-reservation hash, with at most four hexadecimal digits.
- -ReservedBy String
- Name displayed by Excel for the write reservation.
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.Services.OfficeProtectionExcelOptions: Shell options for the Excel protection vocabulary in the cross-format command.