Yes unfortunately this feature enhancement is pretty much what I'm looking 
for.  I was looking at the puppetlabs\powershell provider to see if I could 
easily fork it and patch it with what I need, but I'm not too familiar with 
coding providers.  I'm pretty novice with Puppet still.

I'm going to try to use Invoke-Command which allows for PSCredentials to be 
passed as is documented here: 
http://matthewyarlett.blogspot.com/2014/04/powershell-runas.html



On Tuesday, October 28, 2014 3:39:53 PM UTC-4, Rob Reynolds wrote:
>
>
>
> On Tue, Oct 28, 2014 at 10:48 AM, Jeff Picklyk <jpic...@gmail.com 
> <javascript:>> wrote:
>
>> Hello everyone,
>>
>> What is the suggested way with Puppet 3.7.x of running a powershell 
>> command under another user's context?
>>
>> I see that exec has a group and user parameter but I can't find 
>> documentation on how this relates to windows and specifically powershell 
>> commands.  It would be nice if I could just provide a PSCredential as an 
>> argument and powershell module just deal with it for me.
>>
>> Ideas?
>>
>
> Hi Jeff,
>  You will likely want to watch PUP-532[1] as it addresses adding the runas 
> for exec on Windows. This is something that is not likely to come out until 
> Puppet 4 or later. It is something that is high on our priority list 
> though, so I'd think we'll see it earlier in the 4.x series.
>
> If you need something sooner, you might be able to make a custom provider 
> for exec that could perform what is needed. Password would likely need to 
> be added to the type, so that makes it a bit more challenging.
>
> [1] https://tickets.puppetlabs.com/browse/PUP-532
>  
>
>>
>> Thanks,
>>
>> Jeff
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/5d210cb3-6c95-4ead-8791-80b1ceea81f0%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/5d210cb3-6c95-4ead-8791-80b1ceea81f0%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Rob Reynolds
> Developer, Puppet Labs
>
> *Join us at **PuppetConf 2015, October 5-9 in Portland, OR - *
> http://2015.puppetconf.com/
> *Register early to save 40%!*
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c3bd8548-358c-4598-9a4e-bd6b3635de5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to