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-17
Command

Get-ProjectVersion

Module PSPublishModule
Inputs
None
Outputs
PowerForge.ProjectVersionInfo

Retrieves project version information from .csproj, .psd1, and build scripts.

Syntax

Get-ProjectVersion [-ExcludeFolders <String[]>] [-ModuleName <String>] [-Path <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Scans the specified path for: *.csproj files*.psd1 filesPowerShell build scripts (*.ps1) that contain Invoke-ModuleBuild and returns one record per discovered version entry.

This is useful for multi-project repositories where you want to quickly verify version alignment across projects/modules.

Examples

Authored help example

Get version information for all projects in the current directory

Get-ProjectVersion

Returns entries for discovered .csproj/.psd1/build scripts under the current folder.

Filter results to one module name

Get-ProjectVersion -ModuleName 'MyModule' -Path 'C:\Projects'

Useful when a repository contains multiple modules/projects but you need only one.

Parameters

-ExcludeFolders String[] optional
Path fragments (or folder names) to exclude from the search (in addition to default 'obj' and 'bin'). This matches against the full path, case-insensitively.
-ModuleName String optional
Optional module name to filter .csproj and .psd1 results.
-Path String optional
The root path to search for project files. Defaults to current directory.

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.