On Tue, Oct 9, 2012 at 9:58 AM, Puppet 3.0 Powershell 2.0 Set ExecutionPolicy Err <lmayorga1...@gmail.com> wrote: > Hi, > > I am trying to set the execution policy on the Powershell 64 bit version. > > > exec { 'rolesfeatures1': > command => 'C:\Windows\System32\cmd.exe /c > C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe Invoke-Command > {Set-ExecutionPolicy RemoteSigned}', > provider => windows, > logoutput => true, > } > > or > > exec { 'rolesfeatures1': > command => 'C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe > Invoke-Command {Set-ExecutionPolicy RemoteSigned}', > provider => windows, > logoutput => true, > } > > Both recipes do not work but when i execute the same command on the cmd > windows works just fine. Any clues? > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/cqynD9TtAR4J. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en.
Since ruby is a 32-bit process, Windows will automatically redirect file system access from C:\Windows\System32 to C:\Windows\SysWOW64. Use C:\Windows\sysnative in your path instead. See http://docs.puppetlabs.com/windows/running.html#file-system-redirection-in-64-bit-windows-versions and the very end of http://docs.puppetlabs.com/windows/troubleshooting.html#error-messages Josh -- Josh Cooper Developer, Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.