Skip to content

Instantly share code, notes, and snippets.

@UtahCampusD
Created December 28, 2016 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UtahCampusD/41445040cd3c48c4659dcccf02e566e6 to your computer and use it in GitHub Desktop.
Save UtahCampusD/41445040cd3c48c4659dcccf02e566e6 to your computer and use it in GitHub Desktop.
>>> import salt.client
>>> caller = salt.client.Caller()
>>> out = caller.cmd('cmd.run', 'some_command', shell=powershell)
>>> print out
>>> import salt.client
>>> caller = salt.client.Caller()
>>> out = caller.cmd('cmd.run', 'some_command', 'shell=powershell')
>>> print out
>>> import salt.client
>>> caller = salt.client.Caller()
>>> out = caller.cmd('cmd.run', 'some_command', 'shell', 'powershell')
>>> print out
@whytewolf
Copy link

whytewolf commented Dec 28, 2016

caller.cmd('cmd.run', 'some_command', shell='powershell') IIRC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment