mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
win_psexec: fix arg handling when command contains multiple args (#44797)
This commit is contained in:
parent
d5d2c80779
commit
9d91607754
3 changed files with 18 additions and 1 deletions
|
@ -110,10 +110,13 @@ If ($extra_opts) {
|
|||
}
|
||||
|
||||
$arguments += "-accepteula"
|
||||
$arguments += $command
|
||||
|
||||
$argument_string = Argv-ToString -arguments $arguments
|
||||
|
||||
# add the command at the end of the argument string, we don't want to escape
|
||||
# that as psexec doesn't expect it to be one arg
|
||||
$argument_string += " $command"
|
||||
|
||||
$start_datetime = [DateTime]::UtcNow
|
||||
$result.psexec_command = "$executable $argument_string"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue