-
Notifications
You must be signed in to change notification settings - Fork 0
Get ConfigurationData
Mateusz Czerniawski edited this page Aug 29, 2018
·
4 revisions
PPoShTools -> Get-ConfigurationData.ps1
Get-ConfigurationData will retrieve configuratin depending on the input
Get-ConfigurationData [-ConfigurationPath] <String[]> [[-OutputType] <String>]
[<CommonParameters>]
Currently JSON (.json) and PowerShell Data (.psd1) are supported. For JSON files possible output is Hashtable (default) and PSObject. For PSD1 files only Hashtable is currently supported. Using helpers function will return an object data from given configuration file
Path to JSON or psd1 file
- PipelineInput: false
- Required: true
- Valid values: PSObject, HashTable
- DefaultValue: HashTable
- PipelineInput: false
- Required: false
Get-ConfigurationData -ConfigurationPath C:\SomePath\Config.json -OutputType Hashtable
Will read content of Config.json file and convert it to a HashTable.
Get-ConfigurationData -ConfigurationPath C:\SomePath\Config.json -OutputType PSObject
Will read content of Config.json file and convert it to a PS Object.
Get-ConfigurationData -ConfigurationPath C:\SomePath\Config.psd1
Will read content of Config.psd1 file and return it as a HashTable.