mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Merge pull request #9602 from cchurch/powershell_splatting
Handle PowerShell parameters passed via splatting
This commit is contained in:
commit
07dfbaedc3
5 changed files with 49 additions and 4 deletions
|
@ -143,7 +143,7 @@ class Connection(object):
|
|||
vvv("EXEC %s" % cmd, host=self.host)
|
||||
# For script/raw support.
|
||||
if cmd_parts and cmd_parts[0].lower().endswith('.ps1'):
|
||||
script = powershell._build_file_cmd(cmd_parts)
|
||||
script = powershell._build_file_cmd(cmd_parts, quote_args=False)
|
||||
cmd_parts = powershell._encode_script(script, as_list=True)
|
||||
try:
|
||||
result = self._winrm_exec(cmd_parts[0], cmd_parts[1:], from_exec=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue