diff --git a/CommandExec/CommandUtils.cs b/CommandExec/CommandUtils.cs index 6271c52..4b1b839 100644 --- a/CommandExec/CommandUtils.cs +++ b/CommandExec/CommandUtils.cs @@ -14,7 +14,7 @@ public static bool CommandExists(string command) } else { - cmd = Command.Shell($"Get-Command -Name {command} -ErrorAction SilentlyContinue | $null") + cmd = Command.Shell($"Get-Command -Name {command} -ErrorAction SilentlyContinue > $null") .RedirectStdOut() .RedirectStdErr() .RedirectStdIn();