private/Tests/Test-CommandPwsh.ps1
|
function Test-CommandPwsh { <# .SYNOPSIS Returns $true when pwsh (PowerShell 7) is available in the current session PATH. .NOTES Author: David Segura Company: Recast Software Use Test-InstallPwsh to check whether PowerShell 7 is installed via the registry or a known path. This function only confirms PATH availability inside the current session. Dependencies: Module Functions: Test-InstallPwsh #> [OutputType([bool])] param () return ($null -ne (Get-Command -Name 'pwsh' -ErrorAction SilentlyContinue)) } |