Итак, я пытаюсь проверить, доступен ли путь. Я делаю это с помощью Test-Path
Это выглядит так:
$c="C:\"
$d="D:\"
$e="E:\"
if(Test-Path $c -eq "False"){
}
elseif(Test-Path $d -eq "False"){
}
elseif(Test-Path $e -eq "False"){
}
else{
"The File doesn't exist"
}
Так что же я делаю не так, если ошибка выглядит следующим образом:
Test-Path : A parameter cannot be found that matches parameter name 'eq'.
At C:\Users\boriv\Desktop\ps\Unbenannt1.ps1:23 char:17
+ If(Test-Path $c -eq "False"){
+ ~~~
+ CategoryInfo : InvalidArgument: (:) [Test-Path], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.TestPathCommand`