Get-Configuration
SYNOPSIS
Reads the content from configuration file(s) and returns as array of configuration objects.
SYNTAX
1 2 |
|
DESCRIPTION
The Get-Configuration function gets the contents of one or more configuration file, validates it against a schema and returns the content as a PSCustomObject in an array.
If a path to a directory is supplied via the PsImportClientDirectory parameter all configuration files in that is read, validated and returned as an array of PSCustomObjects.
If NO input is supplied via the PsImportClientDirectory parameter, the configuration files provided via the ConfigurationFile parameter is read, validated and returned as an array of PSCustomObjects.
If no configurations are found, the function returns an empty array.
EXAMPLES
EXAMPLE 1
1 |
|
In this example no input is provided and we will get back an empty array.
EXAMPLE 2
1 |
|
In this example we supply a custom directory which contains a directory called configurations. All configuration files will be returned as an array.
EXAMPLE 3
1 |
|
In this example we specify what configuration we would like to be returned in the array.
PARAMETERS
-ConfigurationFile
Full path to one or more configuration files.
1 2 3 4 5 6 7 8 9 |
|
-ProgressAction
Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. The Write-Progress cmdlet creates progress bars that show a command's status.
The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break.
1 2 3 4 5 6 7 8 9 |
|
-PsImportClientDirectory
Path to directory where the directory configurations lives.
1 2 3 4 5 6 7 8 9 |
|
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.