/Import-ConfigData

Load configuration data from multiple file types. Yaml, Toml, PSD1, JSON.

Primary LanguagePowerShellApache License 2.0Apache-2.0

Import-ConfigData

Load configuration data from multiple file types. The returned Hashtable should have the same structure regardless of the source format.

Currently supported types:

CI Status

GitHub Workflow Status (with event) Testspace pass ratio PowerShell Gallery

Build history

Install

Install-Module -Name Import-ConfigData or Install-PSResource -Name Import-ConfigData

PowerShell Gallery

Docs

Full Docs

Getting Started

Return an object representing the contents of a PowerShell Data File.

#config.psd1
@{
    DriveName = "data"
}
$config = Import-ConfigData -Path config.psd1
$config.DriveName
data

These config files all return the same PowerShell object.

#config.toml
DriveName = "data"
#config.yml
DriveName: data
{
    "DriveName": "data"
}