Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficePowerPoint

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.PowerPoint.PowerPointDocument System.IO.FileInfo

Creates a themed presentation, returning a live document or saving a completed content block.

Syntax

New-OfficePowerPoint
[-Accent <OfficeColor>]
[-Author <String>]
[-ContinuationFormat <String>]
[-Date <DateTime>]
[-Force]
[-LayoutStrategy <ContentFirst|DesignFirst|Compact|VisualFirst>]
[-NoFooter]
[-NoSlideNumber]
[[-Path] <String>]
[-Purpose <String>]
[-Seed <String>]
[-SlideSize <Screen4x3|Screen16x9|Screen16x10>]
[-Style <Auto|FieldProof|EditorialCaseStudy|TechnicalMap|QuietAppendix>]
[-Template <String>]
[-Theme <OfficeThemeInput>]
[<CommonParameters>]
#
Parameter set: Live
New-OfficePowerPoint
[-Accent <OfficeColor>]
[-AllowLoss]
[-Author <String>]
[-Content] <ScriptBlock>
[-ContinuationFormat <String>]
[-Date <DateTime>]
[-Force]
[-LayoutStrategy <ContentFirst|DesignFirst|Compact|VisualFirst>]
[-NoFooter]
[-NoSlideNumber]
[-PassThru]
[-Password <SecureString>]
[-Path] <String>
[-Purpose <String>]
[-Seed <String>]
[-Show]
[-SlideSize <Screen4x3|Screen16x9|Screen16x10>]
[-Style <Auto|FieldProof|EditorialCaseStudy|TechnicalMap|QuietAppendix>]
[-Template <String>]
[-Theme <OfficeThemeInput>]
[<CommonParameters>]
#
Parameter set: Content

Description

Without a content block no file is written, including on disposal. With a block, publication is atomic and an existing file requires Force. A block failure leaves the destination unchanged.

Examples

Create a deck and return its saved file.

New-OfficePowerPoint -Path ./Status.pptx -Theme Modern -Author 'Operations team' -PassThru {
    PowerPointSlide -Title 'Status update'
}

Create a live document for explicit editing and saving.

$deck = New-OfficePowerPoint -Theme Boardroom
PowerPointSlide -Document $deck -Title 'Service review'
Save-OfficePowerPoint -Document $deck -Path ./Review.pptx
Close-OfficePowerPoint -Document $deck

Create a compact technical review using the dark theme.

New-OfficePowerPoint -Path ./Architecture.pptx -Theme Dark -Purpose 'technical proposal' -LayoutStrategy Compact {
    PowerPointSlide -Title 'Architecture review'
    PowerPointSlide -Title 'Decisions' { PowerPointList 'Retain the API boundary', 'Track rollout evidence' }
}

Parameters

-Accent OfficeColor optional
Brand accent used to derive the theme's accent palette while retaining its fonts and surfaces.
-Author String optional
Author shown on title slides and written to the package's creator property.
-ContinuationFormat String optional
Continuation title format, with title, part and total supplied as {0}, {1} and {2}.
-Date DateTime optional
Date shown on title slides using the current culture's short date format.
-Force SwitchParameter optional
Allow the new document to replace an existing destination.
-LayoutStrategy PowerPointAutoLayoutStrategy optional
ContentFirst, DesignFirst, Compact or VisualFirst allocation; overrides the recipe's strategy.
Possible values: ContentFirst, DesignFirst, Compact, VisualFirst
-NoFooter SwitchParameter optional
Suppress footer text on every designed slide.
-NoSlideNumber SwitchParameter optional
Suppress slide numbers on every designed slide.
-Path String required in Contentposition: 0aliases: FilePath
Optional associated destination for a live document; required when a content block saves a file.
-Purpose String optional
Plain-language purpose matched by the native design brief to a built-in recipe.
-Seed String optional
Stable deck seed; an individual slide can supply its own seed.
-SlideSize PowerPointSlideSizePreset optional
Slide dimensions; copied templates retain their dimensions unless this parameter is supplied.
Possible values: Screen4x3, Screen16x9, Screen16x10
-Style PowerPointDeckStyle optional
Composition tuning layered on the theme; Auto uses the theme and purpose-matched recipe.
Possible values: Auto, FieldProof, EditorialCaseStudy, TechnicalMap, QuietAppendix
-Template String optional
Existing presentation/template copied as starting content. Theme applies visual styling separately.
-Theme OfficeThemeInput optional
Built-in theme, theme object or a Word, Excel or PowerPoint document/template whose visual theme is read. Defaults to Modern.
-AllowLoss SwitchParameter optionalsets: Content
Explicitly accept reductions reported by the content block's native save.
-Content ScriptBlock requiredposition: 1sets: Content
Authoring block to complete before the document is atomically saved and closed.
-PassThru SwitchParameter optionalsets: Content
Return the saved FileInfo after a completed content block.
-Password SecureString optionalsets: Content
Password for the saved file; plaintext input warns, and credentials contribute their password.
-Show SwitchParameter optionalsets: Content
Open the saved result in its registered application after the content block succeeds.

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.