Evotec

Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 144
Forks 12
Open issues 16
PowerShell Gallery downloads 150,904
Release v0.2.0
Language: C# Updated: 2026-04-06

API Reference

Cmdlet

Add-OfficePowerPointShape

Namespace PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointSlide
Outputs
System.Object

Adds a basic shape to a slide.

Remarks

Creates an auto shape at the requested coordinates and applies optional fill and outline styling.

Examples

Authored help example

Create a rectangle highlight.

PS>


Add-OfficePowerPointShape -Slide $slide -ShapeType Rectangle -X 60 -Y 80 -Width 220 -Height 120 -FillColor '#DDEEFF'
        

Creates a rectangle with a custom fill color.

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.

Syntax

Add-OfficePowerPointShape [-FillColor <String>] [-Height <Double>] [-Name <String>] [-OutlineColor <String>] [-OutlineWidth <Nullable`1>] [-ShapeType <String>] [-Slide <PowerPointSlide>] [-Width <Double>] [-X <Double>] [-Y <Double>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

FillColor String optionalposition: namedpipeline: False
Fill color (hex or named color).
Height Double optionalposition: namedpipeline: False
Shape height in points.
Name String optionalposition: namedpipeline: False
Optional name assigned to the shape.
OutlineColor String optionalposition: namedpipeline: False
Outline color (hex or named color).
OutlineWidth Nullable`1 optionalposition: namedpipeline: False
Outline width in points.
ShapeType String optionalposition: namedpipeline: False
Shape geometry preset name (e.g., Rectangle, Ellipse, Line).
Slide PowerPointSlide optionalposition: namedpipeline: True (ByValue)
Target slide that will receive the shape (optional inside DSL).
Width Double optionalposition: namedpipeline: False
Shape width in points.
X Double optionalposition: namedpipeline: False
Left offset (in points) from the slide origin.
Y Double optionalposition: namedpipeline: False
Top offset (in points) from the slide origin.

Outputs

System.Object