Skip to content

Latest commit

 

History

History
109 lines (83 loc) · 2.12 KB

File metadata and controls

109 lines (83 loc) · 2.12 KB
external help file Module Name online version schema
PSWriteOffice-help.xml
PSWriteOffice
2.0.0

Protect-OfficeWordDocument

SYNOPSIS

Protects a Word document with a password.

SYNTAX

__AllParameterSets

Protect-OfficeWordDocument [-Password] <string> [-Document <WordDocument>] [-ProtectionType <DocumentProtectionValues>] [-PassThru] [<CommonParameters>]

DESCRIPTION

Protects a Word document with a password.

EXAMPLES

EXAMPLE 1

PS>Protect-OfficeWordDocument -Password 'secret'

Applies read-only protection to the current document.

PARAMETERS

-Document

Document to protect when provided explicitly.

Type: WordDocument
Parameter Sets: __AllParameterSets
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: True

-PassThru

Emit the protected document.

Type: SwitchParameter
Parameter Sets: __AllParameterSets
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Password

Password to apply.

Type: String
Parameter Sets: __AllParameterSets
Aliases: None
Possible values: 

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ProtectionType

Protection type (defaults to ReadOnly).

Type: DocumentProtectionValues
Parameter Sets: __AllParameterSets
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • OfficeIMO.Word.WordDocument

OUTPUTS

  • System.Object

RELATED LINKS

  • None