Cmdlet
Unprotect-OfficeDocument
Removes native package encryption or selected editing restrictions.
Syntax
Unprotect-OfficeDocument
[-Options <Object[]>]
[-OutputPath <String>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Restriction <OfficeProtectionRestriction[]>]
[<CommonParameters>]#Parameter set:
PathUnprotect-OfficeDocument
-LiteralPath <String[]>
[-Options <Object[]>]
[-OutputPath <String>]
[-PassThru]
[-Password <SecureString>]
[-Restriction <OfficeProtectionRestriction[]>]
[<CommonParameters>]#Parameter set:
LiteralPathUnprotect-OfficeDocument
[-Document] <Object>
[-Options <Object[]>]
[-OutputPath <String>]
[-PassThru]
[-Password <SecureString>]
[-Restriction <OfficeProtectionRestriction[]>]
[<CommonParameters>]#Parameter set:
DocumentExamples
Example 1
Unprotect-OfficeDocument -Path @('C:\Path')Example 2
Unprotect-OfficeDocument -Document 'Value'Example 3
Unprotect-OfficeDocument -LiteralPath @('C:\Path')Parameters
- -Options Object[]
- Native source policy options; PDF accepts its bounded load settings.
- -OutputPath String
- Write one copy; omission saves to the associated path when available.
- -PassThru SwitchParameter
- Emit the saved file or caller-owned/native replacement model.
- -Password SecureString
- Current open password, or PDF owner password for removing Standard security.
- -Path String[]
- Input paths; supports wildcards.
- -Restriction OfficeProtectionRestriction[]
- Remove only these restrictions; omission also removes package encryption.
- Possible values:
ReadOnly,Comments,TrackedChanges,Forms,Structure,Windows,ReadOnlyRecommended,Print,Copy,Modify,Annotate,FillForms,Assemble - -LiteralPath String[]
- Exact input paths.
- -Document Object
- Caller-owned native model.
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.