Maybe `if ($Env:GIT_SSH -imatch 'plink')`?