Project

PSPublishModule

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

Stars47
Forks16
Open issues0
PowerShell Gallery downloads17213
Releasev3.0.131
Language: C# Updated: 2026-09-02T21:02:59.0000000+00:00

Curated Examples

Example.Removecomments.Ps1

Source-owned example maintained with PSPublishModule.

Import-Module .\PSPublishModule.psd1 -Force

$removeCommentsSplat = @{
    SourceFilePath      = 'C:\Users\przemyslaw.klys\OneDrive - Evotec Services sp. z o.o\Documents\PowerShell\Modules\PSWriteHTML\PSWriteHTML.psm1'
    DestinationFilePath = 'C:\Support\GitHub\PSPublishModule\Examples\TestScript1.ps1'
}

#Remove-Comments @removeCommentsSplat -RemoveCommentsInParamBlock -RemoveAllEmptyLines -RemoveCommentsBeforeParamBlock

$removeCommentsSplat = @{
    SourceFilePath                 = 'C:\Support\GitHub\PSPublishModule\Examples\TestScript.ps1'
    DestinationFilePath            = 'C:\Support\GitHub\PSPublishModule\Examples\TestScript1.ps1'
    # RemoveAllEmptyLines            = $true
    RemoveEmptyLines               = $true
    RemoveCommentsInParamBlock     = $false
    RemoveCommentsBeforeParamBlock = $false
}

Remove-Comments @removeCommentsSplat