# Set-OfficePdfAnnotation

Updates a single indirect PDF annotation. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.String`

**Outputs**

`System.IO.FileInfo` `OfficeIMO.Pdf.PdfAnnotationEditResult`

**Source**

[SetOfficePdfAnnotationCommand.cs:12](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/SetOfficePdfAnnotationCommand.cs#L12) 

Updates a single indirect PDF annotation.

## Syntax

```
Set-OfficePdfAnnotation
[-Color <String>]
[-Contents <String>]
[-Flags <Int32>]
[-IgnorePermissionRestrictions]
[-Name <String>]
-ObjectNumber <Int32>
[-OutputPath] <String>
[-PassThru]
[-PassThruReport]
[-Password <String>]
[-Path] <String>
[-RemoveAction]
[-Title <String>]
[<CommonParameters>]
```

[#](#method-set-officepdfannotation-string-string-int32-switchparameter-string-int32-string-switchparameter-switchparameter-string-string-switchparameter-string)

Parameter set: `All Parameter Sets`

## Examples

### Example 1

```powershell
Set-OfficePdfAnnotation -Path 'C:\Path' -OutputPath 'C:\Path' -ObjectNumber 1
```

## Parameters

**-Color String optional**

Replacement annotation color. Named colors and hexadecimal values are accepted.

**-Contents String optional**

Replacement annotation contents text.

**-Flags Int32 optional**

Replacement annotation flags.

**-IgnorePermissionRestrictions SwitchParameter optional**

After successful password authentication, explicitly ignore owner-imposed annotation-modification restrictions.

**-Name String optional**

Replacement annotation name.

**-ObjectNumber Int32 required**

Indirect annotation object number to update.

**-OutputPath String requiredposition: 1**

Output PDF path.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-PassThruReport SwitchParameter optional**

Return the annotation edit result instead of the output file.

**-Password String optional**

Password used to authenticate an encrypted PDF.

**-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath**

Input PDF path.

**-RemoveAction SwitchParameter optional**

Remove /A and /AA action dictionaries from the annotation.

**-Title String optional**

Replacement annotation title text.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:8B3CB11B5370E2B675FA7F3ADBBCFCFF1558B19DC468D4CF9D723FC68C88C0B8 -->
