private/Tests/Test-PwshVersionMin.ps1
|
function Test-PwshVersionMin { <# .SYNOPSIS Returns $true when the currently running PowerShell session is version 7.4 or higher. .NOTES Author: David Segura Company: Recast Software This is an in-process check against $PSVersionTable — it does not probe any installed copy of pwsh on disk. Dependencies: None #> [OutputType([bool])] param () $minVersion = [System.Version]'7.4' return ($PSVersionTable.PSVersion -ge $minVersion) } |