Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

New-OfficePowerPoint

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

Creates a PowerPoint presentation using the DSL.

Syntax

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

Description

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

Examples

Create and capture the presentation object.

$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.

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

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

Parameters

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

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.