Evotec

Project

PSPublishModule

PSPublishModule is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 43
Forks 13
Open issues 1
PowerShell Gallery downloads 13,876
Release v3.0.3
Language: C# Updated: 2026-04-14

API Reference

Cmdlet

New-ConfigurationPlaceHolder

Namespace PSPublishModule
Inputs
None
Outputs
System.Object

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

Authored help example

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>]
#
Parameter set: FindAndReplace

Parameters

Find String requiredposition: namedpipeline: False
The string to find in the script or module content.
Replace String requiredposition: namedpipeline: False
The string to replace the Find string in the script or module content.

Outputs

System.Object

New-ConfigurationPlaceHolder -CustomReplacement <PlaceHolderReplacement[]> [<CommonParameters>]
#
Parameter set: CustomReplacement

Parameters

CustomReplacement PlaceHolderReplacement[] requiredposition: namedpipeline: False
Custom placeholder replacements. Accepts legacy hashtable array (@{ Find='..'; Replace='..' }) or PlaceHolderReplacement[].

Outputs

System.Object