This is a configuration module for PowerShell. This finds configuration files, read them and convert them to Hashtables.
This module treats three types of configurations:
- local configuration
- user global configuration
- system global configuration
A local configuration is named $appname.yaml and located at the current working directory or its parents recursively.
A user global configuration is named config.yaml and located at $Env:APPDATA\$appname.
A system global configuration is named config.yaml and located at $Env:ProgramData\$appname.
When the configurations have the same keys, upper ones overwrite.
For example there are following configurations:
# local configuration
foo: foo
# user global configuration
bar: bar
# system global configuration
bar: buzzyou get:
foo: foo
bar: barbar: buzz is overwritten.
When .\foo.yaml is:
foo: 1
bar: hello
buzz:
- one
- twocall:
> Get-Config foo
Name Value
---- -----
bar hello
foo 1
buzz {one, two}