API Reference
Get-ProjectVersion
Retrieves project version information from .csproj, .psd1, and build scripts.
Remarks
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
Get version information for all projects in the current directory
PS>
Get-ProjectVersion
Returns entries for discovered .csproj/.psd1/build scripts under the current folder.
Filter results to one module name
PS>
Get-ProjectVersion -ModuleName 'MyModule' -Path 'C:\Projects'
Useful when a repository contains multiple modules/projects but you need only one.
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
Get-ProjectVersion [-ExcludeFolders <String[]>] [-ModuleName <String>] [-Path <String>] [<CommonParameters>]
#
All Parameter SetsParameters
- ExcludeFolders String[]
- 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 module name to filter .csproj and .psd1 results.
- Path String
- The root path to search for project files. Defaults to current directory.
Outputs
PowerForge.ProjectVersionInfo