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
Create a rectangle highlight.
PS>
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointShape.pptx {
$slide = Add-OfficePowerPointSlide -Layout 1 -PassThru
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 <Double>] [-PassThru] [-ShapeType <Line>] [-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 Double
- Outline width in points.
- PassThru SwitchParameter
- Emit the object created or changed by the command.
- ShapeType OfficePresetShapeType
- Shape geometry preset name (e.g., Rectangle, Ellipse, Line).
- Possible values:
Line,LineInverse,Triangle,RightTriangle,Rectangle,Diamond,Parallelogram,Trapezoid,NonIsoscelesTrapezoid,Pentagon,Hexagon,Heptagon,Octagon,Decagon,Dodecagon,Star4,Star5,Star6,Star7,Star8,Star10,Star12,Star16,Star24,Star32,RoundRectangle,Round1Rectangle,Round2SameRectangle,Round2DiagonalRectangle,SnipRoundRectangle,Snip1Rectangle,Snip2SameRectangle,Snip2DiagonalRectangle,Plaque,Ellipse,Teardrop,HomePlate,Chevron,PieWedge,Pie,BlockArc,Donut,NoSmoking,RightArrow,LeftArrow,UpArrow,DownArrow,StripedRightArrow,NotchedRightArrow,BentUpArrow,LeftRightArrow,UpDownArrow,LeftUpArrow,LeftRightUpArrow,QuadArrow,LeftArrowCallout,RightArrowCallout,UpArrowCallout,DownArrowCallout,LeftRightArrowCallout,UpDownArrowCallout,QuadArrowCallout,BentArrow,UTurnArrow,CircularArrow,LeftCircularArrow,LeftRightCircularArrow,CurvedRightArrow,CurvedLeftArrow,CurvedUpArrow,CurvedDownArrow,SwooshArrow,Cube,Can,LightningBolt,Heart,Sun,Moon,SmileyFace,IrregularSeal1,IrregularSeal2,FoldedCorner,Bevel,Frame,HalfFrame,Corner,DiagonalStripe,Chord,Arc,LeftBracket,RightBracket,LeftBrace,RightBrace,BracketPair,BracePair,StraightConnector1,BentConnector2,BentConnector3,BentConnector4,BentConnector5,CurvedConnector2,CurvedConnector3,CurvedConnector4,CurvedConnector5,Callout1,Callout2,Callout3,AccentCallout1,AccentCallout2,AccentCallout3,BorderCallout1,BorderCallout2,BorderCallout3,AccentBorderCallout1,AccentBorderCallout2,AccentBorderCallout3,WedgeRectangleCallout,WedgeRoundRectangleCallout,WedgeEllipseCallout,CloudCallout,Cloud,Ribbon,Ribbon2,EllipseRibbon,EllipseRibbon2,LeftRightRibbon,VerticalScroll,HorizontalScroll,Wave,DoubleWave,Plus,FlowChartProcess,FlowChartDecision,FlowChartInputOutput,FlowChartPredefinedProcess,FlowChartInternalStorage,FlowChartDocument,FlowChartMultidocument,FlowChartTerminator,FlowChartPreparation,FlowChartManualInput,FlowChartManualOperation,FlowChartConnector,FlowChartPunchedCard,FlowChartPunchedTape,FlowChartSummingJunction,FlowChartOr,FlowChartCollate,FlowChartSort,FlowChartExtract,FlowChartMerge,FlowChartOfflineStorage,FlowChartOnlineStorage,FlowChartMagneticTape,FlowChartMagneticDisk,FlowChartMagneticDrum,FlowChartDisplay,FlowChartDelay,FlowChartAlternateProcess,FlowChartOffpageConnector,ActionButtonBlank,ActionButtonHome,ActionButtonHelp,ActionButtonInformation,ActionButtonForwardNext,ActionButtonBackPrevious,ActionButtonEnd,ActionButtonBeginning,ActionButtonReturn,ActionButtonDocument,ActionButtonSound,ActionButtonMovie,Gear6,Gear9,Funnel,MathPlus,MathMinus,MathMultiply,MathDivide,MathEqual,MathNotEqual,CornerTabs,SquareTabs,PlaqueTabs,ChartX,ChartStar,ChartPlus - 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.