Public/Get-SimpleSettingConfigurationFile.ps1
function Get-SimpleSettingConfigurationFile { [CmdletBinding()] param ( [Parameter()] [String] $override = $null ) if ($null -eq $override -or $override -eq "") { Write-Verbose -Message "No override provided, using default configuration file '$env:SIMPLESETTINGS_CONFIG_FILE'" $defaultConfigFile = $env:SIMPLESETTINGS_CONFIG_FILE } else { $defaultConfigFile = $override } if (-not (Test-Path $defaultConfigFile)) { "{}" | Set-Content $defaultConfigFile } Write-Verbose -Message "Configuration File set to '$defaultConfigFile'" return $defaultConfigFile } |