Copying from a Command Prompt window by dragging a rectangle is nobody’s favourite. Windows ships a tiny command that does it for you.
dir | clip
ipconfig /all | clip
clip < readme.txt
Whatever comes through the pipe or the file ends up on the clipboard, ready for Ctrl+V in a ticket, a mail or a chat. It prints nothing, which is normal.
I’d use it any time someone asks me to send the output of a diagnostic command. It arrives complete, without the first lines scrolled off the screen.
It also works from Linux under WSL, because WSL can run Windows programs if you add the extension:
cat ~/.ssh/id_ed25519.pub | clip.exe
Read before you paste. Something like ipconfig /all includes machine names and network details that you may not want in a public forum post.
It only writes. There is no way to read the clipboard back with clip, so for that you need PowerShell’s Get-Clipboard. Text with accented or non Latin characters can come out garbled depending on the code page of your console, so check a sample before you paste it into something important. And each use replaces what was there before.
Further reading: clip command reference, Working across Windows and Linux file systems
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more