How can I view command prompt history after the window is closed on Windows 10?

I saw in the morning a command prompt window for just one second. After the command finished the window was closed.

I would like to see, what command was run before it closed. Is it possible?

I know, I can see prompt history, if I press F7, but this only works until the command prompt window is closed.

I ran my virus killer applications (Malwarebytes and Windows Defender), but I did not get any result.

I think that was a virus or an undetected malware, that's why so important to me what's going on in the background. More so I am afraid because I downloaded an application from a untrusted source. But I don't want to remove this application, I would like to explore what it does to my system.


Install ConEmu and do the following:

  1. Press Win + Alt + P
  2. Go to "Features"
  3. Enable "Log console output (*)"
  4. Clear the line below "Log console output (*)" and change it to "%userprofile%\ConEmuLogs"
  5. Press the button which is at the top right. It should close or ConEmu might give you an error (ignore it unless it is about the log file)
  6. Close the tab you opened in ConEmu if it didn't close automatically.
  7. Press Win + R and enter "%userprofile%\ConEmuLogs"
  8. Press ENTER
  9. Find a file with the following format "ConEmu-YYYY-MM-DD-pNNNN.log"
  10. Open it w/ a text editor, like Notepad.
  11. This log file will contain all the commands run and their output.
  12. Please reply back to tell me if this worked for you and/or I misunderstood you. Have a nice day!