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

Set-OfficePowerPointBackground

Aliases: PptBackground
Module
PSWriteOffice
Aliases
PptBackground
Inputs
OfficeIMO.PowerPoint.PowerPointSlide
Outputs
OfficeIMO.PowerPoint.PowerPointSlide

Sets the slide background color or image.

Syntax

Set-OfficePowerPointBackground
[-Color] <String>
[-PassThru]
[-Slide <PowerPointSlide>]
[<CommonParameters>]
#
Parameter set: Color
Set-OfficePowerPointBackground
[-ImagePath] <String>
[-PassThru]
[-Slide <PowerPointSlide>]
[<CommonParameters>]
#
Parameter set: Image
Set-OfficePowerPointBackground
-Clear
[-PassThru]
[-Slide <PowerPointSlide>]
[<CommonParameters>]
#
Parameter set: Clear

Examples

Apply a solid background color.

Get-OfficePowerPointSlide -Presentation $ppt -Index 0 | Set-OfficePowerPointBackground -Color '#F4F7FB'

Applies a solid color fill to the slide background.

Apply a background image.

Set-OfficePowerPointBackground -Slide $slide -ImagePath '.\hero.png'

Uses the provided image as the slide background.

Parameters

-Color String requiredposition: 0sets: Color
Background color (hex or named color).
-PassThru SwitchParameter optional
Emit the object created or changed by the command.
-Slide PowerPointSlide optionalpipeline: True (ByValue)
Slide to update (optional inside a slide DSL scope).
-ImagePath String requiredposition: 0sets: Image
Path to a background image file.
-Clear SwitchParameter requiredsets: Clear
Clears any explicit background color or image.

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.