private/Initialize-OSDeploySoftware.ps1
|
function Initialize-OSDeploySoftware { <# .SYNOPSIS Initializes the OSDeployBootImage functions by applying PSDefaultParameterValues. .DESCRIPTION Applies a two-layer PSDefaultParameterValues system at module load time: Layer 1 - Module defaults: flat key-value pairs in default.json (module root) Layer 2 - User overrides: $Script:OSDeploySoftwareUserDefaults (Repository\PSDefaultParameterValues.json) The user override file is loaded last, so any key it defines overwrites the module default for the same key. Keys present only in the module defaults are unaffected. Single-line (//) and block (/* */) comments are stripped before parsing so that annotated JSON files are supported. .INPUTS None. This function does not accept pipeline input. .OUTPUTS None. .NOTES Author: David Segura Company: Recast Software Change Summary: - Initial implementation of two-layer PSDefaultParameterValues loading. - Layer 1 source moved from PSDefaultParameterValues.json into default.json (flat key-value structure). - Layer 2 path changed to $Script:OSDeploySoftwareUserDefaults. #> [CmdletBinding()] param () # Path to the module-scoped PSDefaultParameterValues $Script:OSDeploySoftwareDefaults = Join-Path $script:OSDeployModuleBase 'core\PSDefaultParameterValues.json' # Path to the user-scoped PSDefaultParameterValues $Script:OSDeploySoftwareUserDefaults = Join-Path $Script:OSDeployCoreRepositoryPath 'PSDefaultParameterValues.json' Set-OSDeployPSDefaultParameterValues -ModuleDefaultsPath $Script:OSDeploySoftwareDefaults -UserDefaultsPath $Script:OSDeploySoftwareUserDefaults } |