E.g., for remote-viewer and xfreerdp apps, they print some info to their stdout and stderr. Also, I can use their special cmd flags like --debug or /log-level:debug to get even more information. So, I can read their stdout and stderr to and write them to a log file for a future investigation, etc.

It looks like mstsc.exe (when run out of a command line) is always completely mute and I found no options to change this. Is it as it is, or do I miss something? Thank you for attention.

1 Answer 1


This can be done this way:

Go to Start->Control Panel -> Administrative Tools -> Event Viewer -> Application and Services Logs -> Microsoft -> Windows -> TerminalServices - ClientActiveXCore -> Microsoft-Windows-TerminalServices-RDPClient/Operational. I found it in this video.

There, when you launch mstsc -- no matter via a cmd or via GUI - you will get runtime log events about connecting, disconnecting, etc.

There is API to fetch the logs (e.g. run out of cmd.exe):

wevtutil query-events Microsoft-Windows-TerminalServices-RDPClient/Operational

This can be done programmatically via Event Logging API or Windows Event Log API. Not sure which one -- I have not tried it out yet. I discovered this info here. It looks like the latter variant should work, but it is only supported since Vista. So maybe, it is better to give a try with the former one first.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .