Cmdlet
New-OfficePdfEncryptionOptions
Creates PDF encryption settings; Protect-OfficeDocument supplies the actual passwords.
Syntax
New-OfficePdfEncryptionOptions
[-Algorithm <Aes256| Aes128| LegacyRc4>]
[-NoMetadataEncryption]
[<CommonParameters>]#Parameter set:
DefaultExamples
Select AES-256 while leaving metadata readable.
$options = New-OfficePdfEncryptionOptions -Algorithm Aes256 -NoMetadataEncryption
Protect-OfficeDocument -Path ./Report.pdf -Encrypt -Password $password -Options $optionsParameters
- -Algorithm PdfStandardEncryptionAlgorithm
- Native PDF Standard encryption algorithm.
- Possible values:
Aes256,Aes128,LegacyRc4 - -NoMetadataEncryption SwitchParameter
- Leave document metadata unencrypted.
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.