Pode icon indicating copy to clipboard operation
Pode copied to clipboard

Invoke-PodeTask enhanceent

Open davidfencik opened this issue 2 years ago • 1 comments

Describe the Change

I want to be able to run an elevated command using credentials stored as environment variables. I would like to do this without running the service as an elevated user. I just want to elevate the execution of a single script block. It seems impossible to use Invoke-Command using -Session or -Credential. Also, there is no way to pass either of these parameters to Invoke-PodeTask. Is there some other way?

davidfencik avatar Jul 03 '23 21:07 davidfencik

Hi @davidfencik,

If you have the credentials stored in environment variables, then using -Credential on Invoke-Command should work 🤔 Have you got some example code as to what you're trying to achieve?

Badgerati avatar Jul 07 '23 19:07 Badgerati