How do i run a Console Command in C++

I would recommend using APlayerController::ConsoleCommand if you can easily get the appropriate APlayerController reference.

Using UEngine::Exec via GEngine does seem to cover a large subset of console commands (but not all, as some will need a target and must be routed through the PlayerController in order to find said target).

GEngine->Exec( GetWorld(), TEXT( "stat startfile" ) );
2 Likes