API Reference
Cmdlet
Close-OfficePowerPoint
Closes a PowerPoint presentation and optionally saves it.
Remarks
Provides a cmdlet wrapper so PowerShell scripts do not need to call Dispose directly.
Examples
Close without saving.
PS>
$ppt = Get-OfficePowerPoint -FilePath .\deck.pptx; Close-OfficePowerPoint -Presentation $ppt
Releases the loaded presentation instance.
Save, open, and close.
PS>
Close-OfficePowerPoint -Presentation $ppt -Save -Show
Saves the presentation, opens it in PowerPoint, and releases the object.
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
Close-OfficePowerPoint [-Password <String>] -Presentation <PowerPointPresentation> [-Save] [-Show] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Password String
- Password used to save the presentation as an encrypted package.
- Presentation PowerPointPresentation
- Presentation to close.
- Save SwitchParameter
- Persist changes before closing.
- Show SwitchParameter
- Open the presentation in PowerPoint after saving.
Outputs
System.Object