# Get-ProjectVersion

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

Project

PSPublishModule

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

[View on GitHub](https://github.com/EvotecIT/PSPublishModule) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSPublishModule/releases/tag/v3.0.124) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSPublishModule/2.0.27)

Stars **48**

Forks **15**

Open issues **1**

PowerShell Gallery downloads **17,213**

Release **v3.0.195**

Language: C# Updated: 2026-11-25

Command 

**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>]
```

[#](#method-get-projectversion-string-string-string)

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

### Get version information for all projects in the current directory

```powershell
Get-ProjectVersion
```

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

### Filter results to one module name

```powershell
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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:8D66972E92BDF39871C52877297598579187C1B95FA792A5B9F4A60A92C35B4E -->
