API Reference
New-ConfigurationPlaceHolder
Helps define custom placeholders replacing content within a script or module during the build process.
Remarks
Placeholders are applied during merge/packaging so you can inject build-time values (versions, build IDs, timestamps) without hardcoding them into source files.
Examples
Replace a single placeholder token
PS>
New-ConfigurationPlaceHolder -Find '{{ModuleVersion}}' -Replace '1.2.3'
Replaces all occurrences of {{ModuleVersion}} in merged content.
Provide multiple replacements
PS>
New-ConfigurationPlaceHolder -CustomReplacement @{ Find='{{Company}}'; Replace='Evotec' }, @{ Find='{{Year}}'; Replace='2025' }
Emits multiple placeholder replacement segments in one call.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
New-ConfigurationPlaceHolder -Find <String> -Replace <String> [<CommonParameters>]
#
FindAndReplaceParameters
- Find String
- The string to find in the script or module content.
- Replace String
- The string to replace the Find string in the script or module content.
Outputs
System.Object
New-ConfigurationPlaceHolder -CustomReplacement <PlaceHolderReplacement[]> [<CommonParameters>]
#
CustomReplacementParameters
- CustomReplacement PlaceHolderReplacement[]
- Custom placeholder replacements. Accepts legacy hashtable array (@{ Find='..'; Replace='..' }) or PlaceHolderReplacement[].
Outputs
System.Object