A PowerShell module for serializing and deserializing PowerShell objects to and from YAML format.
powershell-yaml is a PowerShell module that enables serialization of PowerShell objects to YAML format and deserialization of YAML content back into PowerShell objects. It solves the problem of working with YAML configuration files, data exchange, or structured data within PowerShell scripts by providing simple cmdlets for conversion.
PowerShell scripters, DevOps engineers, and system administrators who need to read, write, or manipulate YAML files as part of automation, configuration management, or tooling workflows.
Developers choose powershell-yaml for its straightforward integration with PowerShell's pipeline, reliable handling of complex object graphs via YamlDotNet, and features like merge key support and JSON compatibility that enhance flexibility in data processing.
PowerShell CmdLets for YAML format manipulation
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides straightforward cmdlets like ConvertTo-Yaml and ConvertFrom-Yaml that work directly with PowerShell objects, enabling easy serialization and deserialization without complex setup.
Leverages YamlDotNet for accurate YAML 1.2 parsing, ensuring support for advanced features like type tags and merge keys, which prevents data ambiguity in conversions.
Tested on PowerShell versions 4 and 5, Nano Server, and reportedly works on Linux and Mac, making it suitable for diverse DevOps and automation environments.
Offers control over YAML output styles (Block, Flow, Sequence Flow) and indentation for sequences, as shown in examples with -Options parameters for customized formatting.
Does not handle duplicate keys in YAML merge operations, throwing exceptions that hinder complex configuration templating, as noted in the README's 'Important note'.
Admits in the README that converting multiple YAML documents back to YAML does not preserve the original structure, limiting reliable round-trip use for document-based workflows.
The JSON-compatible output lacks indentation control, reducing readability for debugging or human inspection, which is a noted drawback in the documentation.
Relies on external YamlDotNet assemblies; while included, it adds complexity if users need to manage or update dependencies manually, especially in restricted environments.