private/Initialize-OSDeployMDT.ps1
|
function Initialize-OSDeployMDT { <# .SYNOPSIS Initializes the OSDeployMDT module by loading config.json and PSDefaultParameterValues. .DESCRIPTION Loads core\MDT\config.json into $Script:OSDeployMDTConfig and applies a two-layer PSDefaultParameterValues system via Set-OSDeployPSDefaultParameterValues: Layer 1 - Module defaults: core\MDT\PSDefaultParameterValues.json Layer 2 - User overrides: $Script:OSDeployMDTUserDefaults (wins over layer 1) 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: - Aligned config.json loading with other Initialize-OSDeployXxx functions. - Delegated PSDefaultParameterValues loading to Set-OSDeployPSDefaultParameterValues. #> [CmdletBinding()] param () # Path to the module-scoped PSDefaultParameterValues $Script:OSDeployMDTDefaults = Join-Path $script:OSDeployModuleBase 'core\PSDefaultParameterValues.json' # Path to the user-scoped PSDefaultParameterValues $Script:OSDeployMDTUserDefaults = Join-Path $Script:OSDeployCoreRepositoryPath 'PSDefaultParameterValues.json' Set-OSDeployPSDefaultParameterValues -ModuleDefaultsPath $Script:OSDeployMDTDefaults -UserDefaultsPath $Script:OSDeployMDTUserDefaults } |