I have an application that creates a Runspace in C# then executes some Powershell scripts. It runs fine if I'm interactively logged in with the account I need to use, however when I try to do standard impersonation, I get errors trying to execute the code.
I need someone with experience doing this type of impersonation. Someone who knows what they're doing could probably make the changes very quickly.
Instead of asking you to incorporate it into my much larger project, a simple console application that can execute and show that it's executing under a specified user context would be sufficient.