Skip to content

Powershell as an alternate shell for cmd.script #5532

Closed

Description

@drawsmcgraw

I want to be able to do this:

salt '*' cmd.script salt://win/repo/scripts/awesome_sauce.ps1 shell='powershell' args='-ingredients secret'

Currently (v 0.15.1), when I do this, the args are silently ignored. This is because Salt executes the Powershell script from within a cmd.exe environment, which causes the args to be ignored. We should have a shell=powershell option so we can easily run Powershell scripts on Minions.

Activity

  1. basepi commented on Jun 14, 2013

    @basepi
    Contributor

    Sounds good to me! Thanks for the report!

  2. UtahDave commented on Jun 20, 2013

    @UtahDave
    Contributor

    @drawsmcgraw since we merged that awesome pull req you sent in, I'm going to close this. Please reopen it if I'm out of line. :)

    Thanks for this awesome addition!

  3. drawsmcgraw commented on Jun 21, 2013

    @drawsmcgraw
    ContributorAuthor

    Glad to help. Your docs made it super easy to learn the process. Thanks!

  4. UtahDave commented on Jun 21, 2013

    @UtahDave
    Contributor

    @drawsmcgraw Hey, would you mind adding an example to the docs for setting the cmd.run and/or cmd.script to using powershell? That would be really helpful.

  5. drawsmcgraw commented on Jun 24, 2013

    @drawsmcgraw
    ContributorAuthor

    @UtahDave Hoping this is what you're looking for:
    #5697

    Thanks!

  6. UtahDave commented on Jun 24, 2013

    @UtahDave
    Contributor

    Thank you! That's great!
    On Jun 23, 2013 7:16 PM, "drawsmcgraw" [email protected] wrote:

    @UtahDave https://github.com/UtahDave Hoping this is what you're
    looking for:
    #5697 #5697

    Thanks!

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/5532#issuecomment-19885164
    .

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

Metadata

Metadata

Assignees

Labels

Feature

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions