Evotec

Project

PSPublishModule

PSPublishModule is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 43
Forks 13
Open issues 1
PowerShell Gallery downloads 13,876
Release v3.0.3
Language: C# Updated: 2026-04-14

API Reference

Cmdlet

Get-ProjectConsistency

Namespace PSPublishModule
Inputs
None
Outputs
System.Object

Provides comprehensive analysis of encoding and line ending consistency across a project.

Remarks

This cmdlet combines encoding and line-ending analysis to provide a single “consistency” view of your repository. It is intended to be run before bulk conversions (encoding/line endings) and before packaging a module for release. For fixing issues during builds, use New-ConfigurationFileConsistency with -AutoFix enabled.

Examples

Authored help example

Analyze a PowerShell project with defaults

PS>


Get-ProjectConsistency -Path 'C:\MyProject' -ProjectType PowerShell
        

Reports encoding and line ending consistency using PowerShell-friendly defaults.

Analyze with explicit recommendations and detailed output

PS>


Get-ProjectConsistency -Path 'C:\MyProject' -ProjectType Mixed -RecommendedEncoding UTF8BOM -RecommendedLineEnding LF -ShowDetails
        

Useful when you want to enforce a policy (e.g. UTF-8 BOM for PS 5.1 compatibility and LF for cross-platform repos).

Export a detailed report to CSV

PS>


Get-ProjectConsistency -Path 'C:\MyProject' -ProjectType CSharp -RecommendedEncoding UTF8 -ExportPath 'C:\Reports\consistency-report.csv'
        

Exports the per-file details so you can review issues outside the console.

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-ProjectConsistency [-CustomExtensions <String[]>] [-ExcludeDirectories <String[]>] [-ExportPath <String>] -Path <String> [-ProjectType <PowerShell|CSharp|Mixed|All|Custom>] [-RecommendedEncoding <Nullable`1>] [-RecommendedLineEnding <Nullable`1>] [-ShowDetails] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

CustomExtensions String[] optionalposition: namedpipeline: False
Custom file extensions to analyze when ProjectType is Custom (e.g., *.ps1, *.cs).
ExcludeDirectories String[] optionalposition: namedpipeline: False
Directory names to exclude from analysis (e.g., .git, bin, obj).
ExportPath String optionalposition: namedpipeline: False
Export the detailed report to a CSV file at the specified path.
Path String requiredposition: namedpipeline: False
Path to the project directory to analyze.
ProjectType String optionalposition: namedpipeline: Falsevalues: 5
Type of project to analyze. Determines which file extensions are included.
Possible values: PowerShell, CSharp, Mixed, All, Custom
RecommendedEncoding Nullable`1 optionalposition: namedpipeline: False
The encoding standard you want to achieve (optional).
RecommendedLineEnding Nullable`1 optionalposition: namedpipeline: False
The line ending standard you want to achieve (optional).
ShowDetails SwitchParameter optionalposition: namedpipeline: False
Include detailed file-by-file analysis in the output.

Outputs

System.Object