API Reference
Cmdlet
New-ConfigurationInformation
Describes what to include/exclude in the module build and how libraries are organized.
Remarks
This configuration segment controls:
Examples
Customize include/exclude rules for packaging
PS>
New-ConfigurationInformation -ExcludeFromPackage 'Ignore','Examples','Docs' -IncludeRoot '*.psd1','*.psm1','LICENSE' -IncludeAll 'Bin','Lib','en-US'
Controls what ends up in packaged artefacts while keeping staging lean.
Add custom files during staging
PS>
New-ConfigurationInformation -IncludeCustomCode { Copy-Item -Path '.\Extras\*' -Destination $StagingPath -Recurse -Force }
Injects additional content into the staging folder before packaging.
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-ConfigurationInformation [-AliasesToExportFolder <String>] [-ExcludeFromPackage <String[]>] [-FunctionsToExportFolder <String>] [-IncludeAll <String[]>] [-IncludeCustomCode <ScriptBlock>] [-IncludePS1 <String[]>] [-IncludeRoot <String[]>] [-IncludeToArray <IncludeToArrayEntry[]>] [-LibrariesCore <String>] [-LibrariesDefault <String>] [-LibrariesStandard <String>] [<CommonParameters>]
#
Parameter set:
All Parameter SetsParameters
- AliasesToExportFolder String
- Folder name containing public aliases to export (e.g., 'Public').
- ExcludeFromPackage String[]
- Paths or patterns to exclude from artefacts (e.g., 'Ignore','Docs','Examples').
- FunctionsToExportFolder String
- Folder name containing public functions to export (e.g., 'Public').
- IncludeAll String[]
- Folder names to include entirely.
- IncludeCustomCode ScriptBlock
- Scriptblock executed during staging to add custom files/folders.
- IncludePS1 String[]
- Folder names where PS1 files should be included.
- IncludeRoot String[]
- File patterns from the root to include (e.g., '*.psm1','*.psd1','License*').
- IncludeToArray IncludeToArrayEntry[]
- Advanced include rules. Accepts legacy hashtable (Key=>Values) or IncludeToArrayEntry[].
- LibrariesCore String
- Relative path to libraries compiled for Core (default 'Lib/Core').
- LibrariesDefault String
- Relative path to libraries for classic .NET (default 'Lib/Default').
- LibrariesStandard String
- Relative path to libraries for .NET Standard (default 'Lib/Standard').
Outputs
System.Object