Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Close-OfficeToml

Module
PSWriteOffice
Inputs
OfficeIMO.Toml.TomlDocument

Completes a live TOML document's lifetime without saving.

Syntax

Close-OfficeToml
-Document <TomlDocument>
[<CommonParameters>]
#
Parameter set: Document

Examples

Discard pending changes.

Close-OfficeToml -Document $document

Read a value and release the document.

$document = Open-OfficeToml -Path ./Cargo.toml
(Get-OfficeTomlNode -Document $document -Select 'package.version').Value
Close-OfficeToml -Document $document

Parameters

-Document TomlDocument requiredpipeline: True (ByValue)
TOML document to close.

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.