Project

PSPublishModule

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

Stars 48
Forks 16
PowerShell Gallery downloads 17,213
Release v3.0.169
Language: C# Updated: 2026-10-13

API Reference

Command

New-ConfigurationModuleBuildProfile

Namespace PSPublishModule
Inputs
None

Emits a reusable module build profile for common PowerForge module builds.

Remarks

This cmdlet emits the same configuration segment types as the lower-level New-ConfigurationFormat, New-ConfigurationDocumentation, New-ConfigurationValidation, New-ConfigurationFileConsistency, New-ConfigurationCompatibility, New-ConfigurationImportModule, and New-ConfigurationBuild commands. Use it when a module wrapper should stay thin and only declare project-specific values.

Examples

Authored help example

Use standard script-module defaults


New-ConfigurationModuleBuildProfile
        

Use binary-module defaults with an owned .NET project


New-ConfigurationModuleBuildProfile -Profile Binary -NETProjectName MyModule -NETProjectPath Sources\MyModule
        

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-ConfigurationModuleBuildProfile [-AboutTopicsSourcePath <String[]>] [-CertificateThumbprint <String>] [-Compatibility <Boolean>] [-Documentation <Boolean>] [-DocumentationPath <String>] [-DocumentationReadmePath <String>] [-DoNotAttemptToFixRelativePaths] [-DotSourceClasses] [-DotSourceLibraries] [-EnableScriptAnalyzer <Boolean>] [-EncodingOverrides <Hashtable>] [-FileConsistency <Boolean>] [-FileConsistencyExcludeDirectories <String[]>] [-ImportRequiredModules <Boolean>] [-ImportSelf <Boolean>] [-InstallMissingModules <Boolean>] [-KillLockersBeforeInstall] [-KillLockersForce] [-MergeFunctionsFromApprovedModules <Boolean>] [-MergeModuleOnBuild <Boolean>] [-MinimumCompatibilityPercentage <Int32>] [-NETAssemblyLoadContext] [-NETAssemblyTypeAcceleratorAssemblies <String[]>] [-NETAssemblyTypeAcceleratorMode <AllowList|Assembly|Enums>] [-NETAssemblyTypeAccelerators <String[]>] [-NETConfiguration <Release|Debug>] [-NETFramework <String[]>] [-NETHandleAssemblyWithSameName] [-NETProjectName <String>] [-NETProjectPath <String>] [-Profile <Standard|Binary>] [-RequiredEncoding <ASCII>] [-RequiredLineEnding <CRLF|LF>] [-ResolveBinaryConflicts] [-ResolveBinaryConflictsName <String>] [-SignIncludeBinaries] [-SignIncludeExe] [-SignIncludeInternals] [-SignModule <Boolean>] [-SkipBuiltinReplacements] [-SyncExternalHelpToProjectRoot <Boolean>] [-Validation <Boolean>] [-VersionedInstallKeep <Int32>] [-VersionedInstallStrategy <Exact|AutoRevision>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AboutTopicsSourcePath String[] optionalposition: namedpipeline: False
Source paths for about-topic files.
CertificateThumbprint String optionalposition: namedpipeline: False
Code-signing certificate thumbprint.
Compatibility Boolean optionalposition: namedpipeline: False
Enable cross-version PowerShell compatibility defaults.
Documentation Boolean optionalposition: namedpipeline: False
Enable documentation generation defaults.
DocumentationPath String optionalposition: namedpipeline: False
Generated documentation path.
DocumentationReadmePath String optionalposition: namedpipeline: False
Readme path used by generated documentation.
DoNotAttemptToFixRelativePaths SwitchParameter optionalposition: namedpipeline: False
Do not attempt to fix relative paths during merge.
DotSourceClasses SwitchParameter optionalposition: namedpipeline: False
Keep classes dot-sourced.
DotSourceLibraries SwitchParameter optionalposition: namedpipeline: False
Keep library-loading code dot-sourced.
EnableScriptAnalyzer Boolean optionalposition: namedpipeline: False
Enable PSScriptAnalyzer as part of validation.
EncodingOverrides Hashtable optionalposition: namedpipeline: False
Per-pattern encoding overrides for file consistency checks.
FileConsistency Boolean optionalposition: namedpipeline: False
Enable file consistency defaults.
FileConsistencyExcludeDirectories String[] optionalposition: namedpipeline: False
Directory names excluded from file consistency checks.
ImportRequiredModules Boolean optionalposition: namedpipeline: False
Import RequiredModules before validation/test steps that need them.
ImportSelf Boolean optionalposition: namedpipeline: False
Import the module under build before validation/test steps that need it.
InstallMissingModules Boolean optionalposition: namedpipeline: False
Install missing module dependencies on the build host.
KillLockersBeforeInstall SwitchParameter optionalposition: namedpipeline: False
Kill locking processes before install.
KillLockersForce SwitchParameter optionalposition: namedpipeline: False
Force killing locking processes before install.
MergeFunctionsFromApprovedModules Boolean optionalposition: namedpipeline: False
Merge referenced functions from approved modules.
MergeModuleOnBuild Boolean optionalposition: namedpipeline: False
Merge module source files during build.
MinimumCompatibilityPercentage Int32 optionalposition: namedpipeline: False
Minimum percentage of cross-compatible files.
NETAssemblyLoadContext SwitchParameter optionalposition: namedpipeline: False
Load binary module dependencies through an AssemblyLoadContext on PowerShell Core.
NETAssemblyTypeAcceleratorAssemblies String[] optionalposition: namedpipeline: False
Assembly names whose public types may be exposed as PowerShell type accelerators.
NETAssemblyTypeAcceleratorMode AssemblyTypeAcceleratorExportMode optionalposition: namedpipeline: Falsevalues: 3
Controls type accelerator exposure for binary-module dependencies.
Possible values: AllowList, Assembly, Enums
NETAssemblyTypeAccelerators String[] optionalposition: namedpipeline: False
Fully-qualified type names to expose as PowerShell type accelerators.
NETConfiguration String optionalposition: namedpipeline: Falsevalues: 2
.NET build configuration.
Possible values: Release, Debug
NETFramework String[] optionalposition: namedpipeline: False
.NET target frameworks to build.
NETHandleAssemblyWithSameName SwitchParameter optionalposition: namedpipeline: False
Handle assemblies with the same name during import.
NETProjectName String optionalposition: namedpipeline: False
Project name for binary-module builds.
NETProjectPath String optionalposition: namedpipeline: False
Path to the owned .NET project for binary-module builds.
Profile ModuleBuildProfileKind optionalposition: namedpipeline: Falsevalues: 2
Named profile to emit.
Possible values: Standard, Binary
RequiredEncoding FileConsistencyEncoding optionalposition: namedpipeline: Falsevalues: 7
Required encoding for file consistency checks.
Possible values: ASCII, UTF8, UTF8BOM, Unicode, BigEndianUnicode, UTF7, UTF32
RequiredLineEnding FileConsistencyLineEnding optionalposition: namedpipeline: Falsevalues: 2
Required line endings for file consistency checks.
Possible values: CRLF, LF
ResolveBinaryConflicts SwitchParameter optionalposition: namedpipeline: False
Resolve binary dependency conflicts.
ResolveBinaryConflictsName String optionalposition: namedpipeline: False
Project name used when resolving binary dependency conflicts.
SignIncludeBinaries SwitchParameter optionalposition: namedpipeline: False
When signing is enabled, include binary files.
SignIncludeExe SwitchParameter optionalposition: namedpipeline: False
When signing is enabled, include executable files.
SignIncludeInternals SwitchParameter optionalposition: namedpipeline: False
When signing is enabled, include internal scripts.
SignModule Boolean optionalposition: namedpipeline: False
Enable signing for the built module.
SkipBuiltinReplacements SwitchParameter optionalposition: namedpipeline: False
Skip built-in placeholder replacements during build.
SyncExternalHelpToProjectRoot Boolean optionalposition: namedpipeline: False
Sync generated external help back to the project root.
Validation Boolean optionalposition: namedpipeline: False
Enable module validation defaults.
VersionedInstallKeep Int32 optionalposition: namedpipeline: False
Number of installed versions to keep.
VersionedInstallStrategy InstallationStrategy optionalposition: namedpipeline: Falsevalues: 2
Versioned install strategy.
Possible values: Exact, AutoRevision