Feature Request: Impersonate option for packaged EXE

I was wondering if it would be possible to include an ‘Impersonate as’ option when packaging scripts as EXEs.

Tool: Visual Studio, Visual Studio Code, PSScriptPad, PowerShell Module
Version: 

Are you hoping to store the credentials of the alternate account within the executable and run as that user?

Yes, that is exactly what I would like to do.

Ok. I have to advise against storing credentials directly in an executable like this. Even with obfuscation, it’s possible to extract them. That said, impersonation is possible and we could look at something like this but I’m a bit concerned about the security issues.

We are aware of the security issues and I agree with you that it is not advisable. This is something that we will be using internally, and are not to worried about having the credentials stored in the exe.

Sounds good. Glad you are aware. I’ll open an issue for this.

That’s great. Thanks!