API Reference
Command
Add-OfficePowerPointSlide
Adds a new slide to a PowerPoint presentation.
Remarks
Adds a new slide to a PowerPoint presentation.
Examples
Append a slide with the default layout.
PS>$ppt = New-OfficePowerPoint -FilePath .\deck.pptx; Add-OfficePowerPointSlide -Presentation $ppt
Creates a deck and appends a new slide at the end.
Create a slide using the DSL.
PS>New-OfficePowerPoint -Path .\deck.pptx { PptSlide { PptTitle -Title 'Status Update' } }
Creates a slide and sets the title using DSL aliases.
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-OfficePowerPointSlide [-Content <ScriptBlock>] [-Layout <Int32>] [-Master <Int32>] [-Presentation <PowerPointPresentation>] [<CommonParameters>]#Parameter set:
IndexParameters
- Content ScriptBlock
- Nested DSL content executed within the slide scope.
- Layout Int32
- Layout index to use (matches the template’s built-in layouts).
- Master Int32
- Slide master index to use.
- Presentation PowerPointPresentation
- Presentation to update (optional inside New-OfficePowerPoint).
Outputs
System.Object
Add-OfficePowerPointSlide [-CaseSensitive] [-Content <ScriptBlock>] -LayoutName <String> [-Master <Int32>] [-Presentation <PowerPointPresentation>] [<CommonParameters>]#Parameter set:
NameParameters
- CaseSensitive SwitchParameter
- Use case-sensitive matching for layout names.
- Content ScriptBlock
- Nested DSL content executed within the slide scope.
- LayoutName String
- Layout name to use (case-insensitive by default).
- Master Int32
- Slide master index to use.
- Presentation PowerPointPresentation
- Presentation to update (optional inside New-OfficePowerPoint).
Outputs
System.Object
Add-OfficePowerPointSlide [-Content <ScriptBlock>] -LayoutType <SlideLayoutValues> [-Master <Int32>] [-Presentation <PowerPointPresentation>] [<CommonParameters>]#Parameter set:
TypeParameters
- Content ScriptBlock
- Nested DSL content executed within the slide scope.
- LayoutType SlideLayoutValues
- Layout type to use.
- Master Int32
- Slide master index to use.
- Presentation PowerPointPresentation
- Presentation to update (optional inside New-OfficePowerPoint).
Outputs
System.Object