diff --git a/Private/Invoke-ExecuteCommand.ps1 b/Private/Invoke-ExecuteCommand.ps1 index 0c96a71..41c226a 100644 --- a/Private/Invoke-ExecuteCommand.ps1 +++ b/Private/Invoke-ExecuteCommand.ps1 @@ -10,13 +10,15 @@ function Invoke-ExecuteCommand ($finalCommand, $executor, $executionPlatform, $T $execPrefix = "/c"; $execExe = "cmd.exe"; $execCommand = $finalCommand -replace "`n", " & " - } + $arguments = $execPrefix,"$execCommand" + } else { $finalCommand = $finalCommand -replace "[\\](?!;)", "`\$&" $finalCommand = $finalCommand -replace "[`"]", "`\$&" $execCommand = $finalCommand -replace "(?