You can use either piping to clip (copy to clipboard) or using stream to provide command output to a text file:
[command] | clip
[command] >> [outputfilename].txt
The first command copies entire command output to the clipboard which can be captured in Notepad or any other word-processors, and the second command generates stream which directly append to end of a text file if the file exists, or create a new file if the file name doesn't exist before then fill it with command output.
Update: If you want to display output in both CMD screen and outputting to text file simultaneously, use this way:
[command] >> [outputfilename].txt & type [outputfilename].txt
The type command reads all contents of the output file immediately after the command finished and display them as part of command line text.
NB: [command] is any recognizable command syntax you want to run with.
Further reference:
CMD: Export all the screen content to a text file
[command] | clipor[command] >> [outputfilename].txtto select entire text generated from command to clipboard or a text file. – Tetsuya Yamamoto Apr 05 '17 at 09:58Ctrl-mto mark text,Ctrl-ato select all, andEnterto copy the selected text to the clip-board. Alternatively, if you selectQuickEdit Modein Properties -> Options, you can select with left-click and drag, and copy with right-click. – AFH Apr 05 '17 at 10:47