# Close-OfficePowerPoint

Closes a PowerPoint presentation and optionally saves it.

Project

PSWriteOffice

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

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.PowerPoint.PowerPointPresentation`

**Source**

[CloseOfficePowerPointCommand.cs:23](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/PowerPoint/CloseOfficePowerPointCommand.cs#L23) 

Closes a PowerPoint presentation and optionally saves it.

## Syntax

```
Close-OfficePowerPoint
[-Open]
[-Password <String>]
[-Path <String>]
-Presentation <PowerPointPresentation>
[-Save]
[<CommonParameters>]
```

[#](#method-close-officepowerpoint-switchparameter-string-string-powerpointpresentation-switchparameter)

Parameter set: `All Parameter Sets`

## Description

Provides a cmdlet wrapper so PowerShell scripts do not need to call Dispose directly.

## Examples

### Close without saving.

```powershell
$ppt = Get-OfficePowerPoint -Path .\deck.pptx; Close-OfficePowerPoint -Presentation $ppt
```

Releases the loaded presentation instance.

### Save, open, and close.

```powershell
Close-OfficePowerPoint -Presentation $ppt -Save -Open
```

Saves the presentation, opens it in PowerPoint, and releases the object.

## Parameters

**-Open SwitchParameter optionalaliases: Show**

Open the presentation after saving. Requires -Save or -Path.

**-Password String optional**

Password used to save the presentation as an encrypted package.

**-Path String optionalaliases: FilePath**

Optional target path when saving.

**-Presentation PowerPointPresentation requiredpipeline: True (ByValue)**

Presentation to close.

**-Save SwitchParameter optional**

Persist changes before closing.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:17DD5159CDA71148FD9638C7ECD9CFFE6EF4588B191948CC3B7DC0205A794F5A -->
