API Reference
Cmdlet
Add-OfficePowerPointShape
Adds a basic shape to a slide.
Remarks
Creates an auto shape at the requested coordinates and applies optional fill and outline styling.
Examples
Example 1: Create a rectangle highlight.
PS>
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointShape.pptx {
$slide = Add-OfficePowerPointSlide -Layout 1
Add-OfficePowerPointShape -Slide $slide -ShapeType Rectangle -X 60 -Y 120 -Width 220 -Height 90 -FillColor '#DDEEFF' -OutlineColor '#2563EB' -OutlineWidth 1
Add-OfficePowerPointTextBox -Slide $slide -Text 'Highlighted status' -X 80 -Y 145 -Width 180 -Height 32
}
Creates a styled rectangle and overlays a text box.
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 SetsParameters
- FillColor String
- Fill color (hex or named color).
- Height Double
- Shape height in points.
- Name String
- Optional name assigned to the shape.
- OutlineColor String
- Outline color (hex or named color).
- OutlineWidth Nullable`1
- Outline width in points.
- ShapeType String
- Shape geometry preset name (e.g., Rectangle, Ellipse, Line).
- Slide PowerPointSlide
- Target slide that will receive the shape (optional inside DSL).
- Width Double
- Shape width in points.
- X Double
- Left offset (in points) from the slide origin.
- Y Double
- Top offset (in points) from the slide origin.