PSScriptBuilder

1.4.0

Build a single deployable PowerShell script from a multi-file project. PSScriptBuilder resolves class inheritance and dependency order automatically using AST analysis - no manual ordering required. Supports classes, enums, functions, template-based output, and release management.

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name PSScriptBuilder

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name PSScriptBuilder

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 Tim Hartling. All rights reserved.

Package Details

Author(s)

  • Tim Hartling

Tags

PSScriptBuilder Build BuildTool Classes ClassDependency DependencyResolution TopologicalSort AST ReleaseManagement SemVer ModuleBuilder Deployment Automation PowerShell5 PowerShell7 Windows Linux MacOS

Functions

Add-PSScriptBuilderCollector Compress-PSScriptBuilderScript ConvertTo-PSScriptBuilderComponentDependencyTree Export-PSScriptBuilderBuildResult Export-PSScriptBuilderDependencyGraph Find-PSScriptBuilderUnusedComponent Format-PSScriptBuilderBuildResult Format-PSScriptBuilderBumpResult Format-PSScriptBuilderDependencyAnalysis Format-PSScriptBuilderReleaseDataResult Format-PSScriptBuilderSourceCoverage Format-PSScriptBuilderTemplateAnalysis Get-PSScriptBuilderBumpConfiguration Get-PSScriptBuilderCollector Get-PSScriptBuilderCollectorContent Get-PSScriptBuilderComponentDependency Get-PSScriptBuilderConfiguration Get-PSScriptBuilderDependencyAnalysis Get-PSScriptBuilderReleaseData Get-PSScriptBuilderReleaseDataTokens Get-PSScriptBuilderSourceCoverage Get-PSScriptBuilderTemplateAnalysis Invoke-PSScriptBuilderBuild New-PSScriptBuilderCollector New-PSScriptBuilderConfiguration New-PSScriptBuilderContentCollector New-PSScriptBuilderProject New-PSScriptBuilderReleaseData New-PSScriptBuilderTemplate Remove-PSScriptBuilderCollector Resolve-PSScriptBuilderSourceLocation Set-PSScriptBuilderProjectRoot Test-PSScriptBuilderBumpConfiguration Test-PSScriptBuilderReleaseData Test-PSScriptBuilderTemplate Update-PSScriptBuilderBumpFiles Update-PSScriptBuilderReleaseData Watch-PSScriptBuilderProject

PSEditions

Desktop Core

Dependencies

This module has no dependencies.

Release Notes

v1.4.0

Added:
- Source maps now record a format version; a source map in a newer, incompatible format is rejected with a clear error
- Resolve-PSScriptBuilderSourceLocation: ComponentLineCount property (number of lines the component spans in the output script)

Changed:
- Update-PSScriptBuilderBumpFiles / Update-PSScriptBuilderReleaseData / New-PSScriptBuilderReleaseData: a run either updates every file or leaves all of them unchanged; a file changed in the meantime is not overwritten; a backup left next to a file by an interrupted run stops the next run
- Update-PSScriptBuilderBumpFiles / Update-PSScriptBuilderReleaseData / New-PSScriptBuilderReleaseData: -Confirm asks once per run and names every file that will change; -WhatIf shows the same
- Update-PSScriptBuilderBumpFiles: bump files are processed and reported in the configured order, with their full paths
- Update-PSScriptBuilderBumpFiles / Test-PSScriptBuilderBumpConfiguration: a token listed more than once is rejected before any file is processed

Deprecated:
- Update-PSScriptBuilderBumpFiles / Update-PSScriptBuilderReleaseData / New-PSScriptBuilderReleaseData: the result returned after -WhatIf or a declined confirmation; version 2.0.0 will return nothing in these cases
- Update-PSScriptBuilderReleaseData: TotalOperationsPerformed; will be removed in version 2.0.0

Fixed:
- Update-PSScriptBuilderBumpFiles: a file configured with differently written paths no longer loses the changes of one entry
- Update-PSScriptBuilderBumpFiles: a placeholder in another letter case whose token has no value now stops the run with an error instead of being silently replaced with nothing
- Update-PSScriptBuilderBumpFiles / Update-PSScriptBuilderReleaseData: a value that changes in letter case only is now written and reported
- Update-PSScriptBuilderBumpFiles: bump files with the same name in different folders each keep their own content when restored after an error
- Update-PSScriptBuilderBumpFiles: a file that cannot be written no longer leaves the project partially bumped
- Update-PSScriptBuilderBumpFiles: a token listed twice in different letter case is now rejected as a duplicate
- Update-PSScriptBuilderReleaseData: a failed update no longer rewrites the release data file
- Update-PSScriptBuilderBumpFiles / New-PSScriptBuilderReleaseData: -Confirm and -WhatIf no longer refer to internal steps
- Resolve-PSScriptBuilderSourceLocation / Get-PSScriptBuilderSourceCoverage: a missing or locked output script now causes a single warning instead of an error
- Resolve-PSScriptBuilderSourceLocation / Get-PSScriptBuilderSourceCoverage: a damaged source map is now rejected with an error that names the problem
- Resolve-PSScriptBuilderSourceLocation: -ErrorRecord now only resolves errors that originated in the output script
- Resolve-PSScriptBuilderSourceLocation / Get-PSScriptBuilderSourceCoverage: lines outside any component are now reported as not resolvable instead of being attributed to the preceding component
- Invoke-PSScriptBuilderBuild / Watch-PSScriptBuilderProject: source map line numbers now match PowerShell's for output scripts with CR-only line endings or an extra carriage return before a line break
- New-PSScriptBuilderConfiguration / New-PSScriptBuilderProject: a relative -Path is now resolved against the current PowerShell location
- Set-PSScriptBuilderProjectRoot: -Path is no longer read as a wildcard pattern
- Project root discovery: now fails with a clear error when the current location is on another provider's drive

Full changelog: https://github.com/PSScriptBuilder/PSScriptBuilder/blob/main/CHANGELOG.md

FileList

Version History

Version Downloads Last updated
1.4.0 (current version) 15 11/27/2026
1.3.1 32 10/29/2026
1.3.0 15 10/27/2026
1.2.0 104 8/2/2026
1.1.0 58 5/5/2026
1.0.0 19 4/14/2026
Show more