# New-ConfigurationPlaceHolder

Helps define custom placeholders replacing content within a script or module during the build process.

Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

[View on GitHub](https://github.com/EvotecIT/PSPublishModule) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSPublishModule/releases/tag/v3.0.124) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSPublishModule/2.0.27)

Stars **48**

Forks **15**

Open issues **1**

PowerShell Gallery downloads **17,213**

Release **v3.0.195**

Language: C# Updated: 2026-11-25

Command 

**Module**

`PSPublishModule`

**Inputs**

`None`

Helps define custom placeholders replacing content within a script or module during the build process.

## Syntax

```
New-ConfigurationPlaceHolder
-Find <String>
-Replace <String>
[<CommonParameters>]
```

[#](#method-new-configurationplaceholder-string-string)

Parameter set: `FindAndReplace`

```
New-ConfigurationPlaceHolder
-CustomReplacement <PlaceHolderReplacement[]>
[<CommonParameters>]
```

[#](#method-new-configurationplaceholder-placeholderreplacement)

Parameter set: `CustomReplacement`

## Description

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

```powershell
New-ConfigurationPlaceHolder -Find '{{ModuleVersion}}' -Replace '1.2.3'
```

Replaces all occurrences of {{ModuleVersion}} in merged content.

### Provide multiple replacements

```powershell
New-ConfigurationPlaceHolder -CustomReplacement @{ Find='{{Company}}'; Replace='Evotec' }, @{ Find='{{Year}}'; Replace='2025' }
```

Emits multiple placeholder replacement segments in one call.

## Parameters

**-Find String requiredsets: FindAndReplace**

The string to find in the script or module content.

**-Replace String requiredsets: FindAndReplace**

The string to replace the Find string in the script or module content.

**-CustomReplacement PlaceHolderReplacement[] requiredsets: CustomReplacement**

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

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:3D70426134572FB17F311E55496F63E4280E1A0C4E6B30FEC5AE5CF7957903F5 -->
