Launch in-game console commands remotely

Has anyone ever tried and succeeded to launch in-game console commands from an external software.

I tried to launch my game from a c# console application, redirect the standard input, write to the stdin of the process to launch commands but that didn’t work.
I also checked any other pipes that were created by my game’s process without any luck.

It doesn’t have to be a pretty way, spent so much time that anything that works is welcome.

Thanks.