Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

New-OfficePowerPoint

Aliases: OfficePowerPoint, PowerPointNew, PptNew
Namespace PSWriteOffice
Aliases
OfficePowerPoint PowerPointNew PptNew
Inputs
None

Creates a PowerPoint presentation using the DSL.

Remarks

Initializes a presentation, runs the DSL script block, and optionally saves the deck.

Examples

Authored help example

Create and capture the presentation object.

PS>


$ppt = New-OfficePowerPoint -Path .\deck.pptx -NoSave
        

Creates a live presentation associated with deck.pptx for incremental composition.

Create a deck with a title slide.

PS>


New-OfficePowerPoint -Path .\deck.pptx { PptSlide { PptTitle -Title 'Status Update' } } -Open
        

Creates, saves, and opens a deck with one titled slide.

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

New-OfficePowerPoint [-Content <ScriptBlock>] [-NoSave] [-Open] [-PassThru] [-Password <String>] -Path <String> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Content ScriptBlock optionalposition: 1pipeline: False
DSL scriptblock describing presentation content.
NoSave SwitchParameter optionalposition: namedpipeline: False
Skip saving after executing the DSL.
Open SwitchParameter optionalposition: namedpipeline: False
Open the presentation after saving.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the saved FileInfo for chaining.
Password String optionalposition: namedpipeline: False
Password used to save the presentation as an encrypted package.
Path String requiredposition: 0pipeline: Falsealiases: FilePath
Destination path for the new .pptx.