Private/Test-psePS1Extension.ps1

function Test-psePS1Extension {

    [cmdletbinding()]
    param (
        [parameter(mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [string[]]$filePath
    )

    process {
        foreach ($path in $filepath) {
            if ($Path.EndsWith(".ps1", [System.StringComparison]::InvariantCultureIgnoreCase)) {
                Write-host "File path ends with .ps1 extension." -ForegroundColor DarkGray
                $true
            } else {
                Write-Host "File path does not end with .ps1 extension." -ForegroundColor DarkGray
                $false
            }
        }
    }
}