mkellerman / Invoke-CommandAs

Invoke Command As System/Interactive/GMSA/User on Local/Remote machine & returns PSObjects.
https://www.powershellgallery.com/packages/Invoke-CommandAs/
MIT License
455 stars 71 forks source link

Pass a filepath parameter like invoke-command #20

Closed weiyentan closed 5 years ago

weiyentan commented 5 years ago

Suggestion is to provide an option to use a parameter called file path which I can run a script as another user

mkellerman commented 5 years ago

Great idea! Will implement on next version!

mkellerman commented 5 years ago

I've just pushed the changes to master. Can you pull a copy from GitHub and test? I'm now replicating ALL parameters from Invoke-Command.

mkellerman commented 5 years ago

Fixed. Invoke-CommandAs has all the same properties than the real Invoke-Command function.