title: saltstack: run powershell script in a state
body: <p>I'm trying to download uru from bitbucket and try to install using vagrant with default login credentials. I'm able to download the archive. When ever I try to run the script see this error - <code>Invalidly-formated env parameter. See documentation.</code>  I'm able to run the script without any errors. I'm running this locally using vagrant in masterless mode. Any help is really appreciated.</p>
  
  <pre><code>download_uru:
    file.managed:
      - name: c:\uru-0.8.3-windows-x86.7z
      - source: https://bitbucket.org/jonforums/uru/downloads/uru-0.8.3-windows-x86.7z
      - source_hash: sha256=f2a7b4ed8ef6b02613b134da19a31293c7423e8fbbd8e49ec5c1c86c5f3a0815
  
  install_uru:
    cmd.run:
      - source: salt://ruby/files/install_uru.ps1
      - shell: powershell
      - env: "-ExecutionPolicy bypass"
      - runas: "vagrant"
      - password: "vagrant"
      - require:
        - file: download_uru
  </code></pre>
  
  <p>$cat install_uru.ps1</p>
  
  <pre><code>set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"
  
  sz x -oC: C:\uru-0.8.3-windows-x86.7z -r ;
  </code></pre>
  
  <p>c:\salt\salt-call.bat --version</p>
  
  <p>salt-call 2016.11.3 (Carbon)</p>