Issue #13196 has been updated by Josh Cooper.
An initial version is available on the forge: <https://github.com/joshcooper/puppetlabs-powershell>, but there are some caveats. It requires powershell to be installed and available in the current PATH. It doesn't disable filesystem redirection, so it always invokes the 32-bit version of powershell on 64-bit Windows OS's. It passes the script to execute on the command line, so it's not suitable for private information. Comments and feedback welcome. ---------------------------------------- Feature #13196: Powershell exec provider https://projects.puppetlabs.com/issues/13196#change-82121 Author: Josh Cooper Status: Accepted Priority: High Assignee: Category: windows Target version: Affected Puppet version: Keywords: windows powershell backlog Branch: Currently users have to wrap powershell scripts in a file, and then execute them with an exec. <pre> exec { 'test': command => 'C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -executionpolicy remotesigned -file C:/test.ps1', } </pre> Instead we should have a powershell provider on Windows that allows powershell scripts to be specified inline. It should also take into account the `%windir%` environment variable, as well as `sysnative` to prevent file system direction (since we want to execute 64-bit powershell from 32-bit ruby). Also, powershell enforces a restricted execution policy for scripts that it downloads. The powershell provider to take care of this. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
