How to run C# compiled assembly using assembly.load in PowerShell and get the output?

I know that I can run a C# .exe using assembly.load and EntryPoint.Invoke, but it prints to stdout rather than returning as a variable. I've seen C# solutions redirect the console to a variable, but I'm not sure how that can be done from PowerShell? I imagine there is probably some code in github that can do this?

Touch here for the full post on Network Security Noblemen tumblr

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s