Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Close-OfficeYaml

Module
PSWriteOffice
Inputs
OfficeIMO.Yaml.YamlDocument

Completes a live YAML document's lifetime without saving.

Syntax

Close-OfficeYaml
-Document <YamlDocument>
[<CommonParameters>]
#
Parameter set: Document

Examples

Discard pending changes.

Close-OfficeYaml -Document $document

Read a value and release the document.

$document = Open-OfficeYaml -Path ./values.yaml
(Get-OfficeYamlNode -Document $document -Select 'image.tag').Value
Close-OfficeYaml -Document $document

Parameters

-Document YamlDocument requiredpipeline: True (ByValue)
YAML 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.