# New-ConfigurationCommand

Defines a command import configuration for the build pipeline.

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`

Defines a command import configuration for the build pipeline.

## Syntax

```
New-ConfigurationCommand
[-CommandName <String[]>]
[-ModuleName <String>]
[<CommonParameters>]
```

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

Parameter set: `All Parameter Sets`

## Description

Used by the build pipeline to declare which commands should be imported from an external module at build time. This helps make build scripts deterministic and explicit about their dependencies.

## Examples

### Reference a single command from a module

```powershell
New-ConfigurationCommand -ModuleName 'Pester' -CommandName 'Invoke-Pester'
```

Declares a dependency on Invoke-Pester from the Pester module.

### Reference multiple commands

```powershell
New-ConfigurationCommand -ModuleName 'PSWriteColor' -CommandName 'Write-Color','Write-Text'
```

Declares multiple command references from the same module.

## Parameters

**-CommandName String[] optional**

One or more command names to reference from the module.

**-ModuleName String optional**

Name of the module that contains the commands.

## 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:08F5D7A4D7BF3E7DBD93C80847F3E860468B1469BB3807D19A47614872CCE555 -->
